atlassian-labs / db-replica

Automatically chooses between database connections to read-write main or read-only replica
Apache License 2.0
10 stars 12 forks source link

JCES-2607: Don't call `DirtyConnectionHook` after rollback #158

Closed wyrzyk closed 2 years ago

wyrzyk commented 2 years ago

We had lots of false positive calls for the scenario.

 connection.setAutoCommit(false);
try{ 
connection.prepareStatement(SIMPLE_QUERY).executeUpdate();
}finally{
connection.rollback()
}
...
...
connection.close()