Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-1007

RedisTemplate with disabled transaction support can't use multi/exec in readOnly Transaction

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.2 RC1 (Moore), 1.8.22 (Ingalls SR22), 2.1.9 (Lovelace SR9)
    • Fix Version/s: None
    • Component/s: Core
    • Environment:
      any environment

      Description

      I believe this pr cause this, https://github.com/spring-projects/spring-data-redis/pull/214

      to solve it,just need to modify here

      RedisConnectionUtils.releaseConnection()

      // when redis "transactional" & enableTranactionSupport & readOnly,then release connection.
      if (isConnectionTransactional(conn, factory)&& enableTranactionSupport && TransactionSynchronizationManager.isCurrentTransactionReadOnly()) {
                  unbindConnection(factory);
              } else if (!isConnectionTransactional(conn, factory)) {
                  if (log.isDebugEnabled()) {
                      log.debug("Closing Redis Connection");
                  }
                  conn.close();
              }
      

      ```

        Attachments

          Activity

            People

            • Assignee:
              mp911de Mark Paluch
              Reporter:
              alonwang alonWang
              Last updater:
              Mark Paluch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified