Skip to content

Commit

Permalink
bugfix: ensure select for update retry correctly (apache#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggndnn authored and slievrly committed Aug 14, 2019
1 parent 0159009 commit 73cd6d3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ public T doExecute(Object... args) throws Throwable {
conn.setAutoCommit(false);
}
sp = conn.setSavepoint();
// #870
// execute return Boolean
// executeQuery return ResultSet
rs = statementCallback.execute(statementProxy.getTargetStatement(), args);

while (true) {
try {
// #870
// execute return Boolean
// executeQuery return ResultSet
rs = statementCallback.execute(statementProxy.getTargetStatement(), args);

// Try to get global lock of those rows selected
TableRecords selectPKRows = buildTableRecords(getTableMeta(), selectPKSQL, paramAppenderList);
String lockKeys = buildLockKey(selectPKRows);
Expand Down

0 comments on commit 73cd6d3

Please sign in to comment.