Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alonWang opened DATAREDIS-1007 and commented
I believe this pr cause this, #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(); }
Affects: 2.2 RC1 (Moore), 1.8.22 (Ingalls SR22), 2.1.9 (Lovelace SR9)
The text was updated successfully, but these errors were encountered:
alonWang commented
demo
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public mixTransaction(){ //... some jpa read operations //redisTemplate.enableTransactionSupport is default false. using jedis as Redis Connection. List result=redisTemplate.execute(new SessionCallback<List>() { @SuppressWarnings({ "unchecked" }) @Override public List execute(RedisOperations operations) throws DataAccessException { operations.watch("123"); // .. check operations operations.multi() //.. some set operations return operations.exec() } }
Sorry, something went wrong.
Mark Paluch commented
We could store that the Template's transaction support was disabled when creating RedisConnectionHolder and evaluate this setting in RedisConnectionUtils.releaseConnection(…)
RedisConnectionHolder
RedisConnectionUtils.releaseConnection(…)
spring-data-redis 2.1.9 have solved this
Thanks for checking. Closing this ticket
mp911de
No branches or pull requests
alonWang opened DATAREDIS-1007 and commented
I believe this pr cause this, #214
to solve it,just need to modify here
RedisConnectionUtils.releaseConnection()
Affects: 2.2 RC1 (Moore), 1.8.22 (Ingalls SR22), 2.1.9 (Lovelace SR9)
The text was updated successfully, but these errors were encountered: