File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,14 @@ public interface AbstractAction<G> {
66
77 Query getQuery (G globalState ) throws SQLException ;
88
9+ /**
10+ * Specifies whether it makes sense to request a {@link Query}, when the previous call to {@link #getQuery(Object)}
11+ * returned a query that failed executing.
12+ *
13+ * @return whether retrying getting queries makes sense, if the first query failed executing.
14+ */
15+ default boolean canBeRetried () {
16+ return true ;
17+ }
18+
919}
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ public void executeStatements() throws SQLException {
6565 do {
6666 query = nextAction .getQuery (globalState );
6767 success = globalState .executeStatement (query );
68- } while (!success && nrTries ++ < globalState .getOptions ().getNrStatementRetryCount ());
68+ } while (nextAction .canBeRetried () && !success
69+ && nrTries ++ < globalState .getOptions ().getNrStatementRetryCount ());
6970 } catch (IgnoreMeException e ) {
7071
7172 }
You can’t perform that action at this time.
0 commit comments