bamaer commented on code in PR #9492:
URL: https://github.com/apache/hop/pull/9492#discussion_r4577283408
##########
plugins/misc/execution-database/src/main/java/org/apache/hop/execution/database/CachingDatabaseExecutionInfoLocation.java:
##########
@@ -434,6 +517,9 @@ private <T> T callWithDatabase(DatabaseWork<T> work,
boolean allowRetry) throws
}
return callWithDatabase(work, false);
}
+ if (allowRetry && !databaseClosed && replaceStaleSession(e)) {
Review Comment:
**Should fix: I couldn't reproduce the stale session with the connection
this location opens**
`connectDatabase()` turns auto-commit on (since #8570). With auto-commit on,
I got:
| Step | Open session | New session |
|---|---|---|
| table dropped and recreated | ok | ok |
| table dropped | `42P01` | `42P01` |
| table recreated after that | ok | |
| schema dropped and recreated | ok | |
`25P02` only showed up with auto-commit off. The only case where a new
session helped was `ALTER ROLE ... SET search_path` with an unqualified table
name.
So in practice the retry mostly runs when the table really is missing. Every
failed call then disconnects and reconnects before `checkTableExists` says no,
which `loadDoesNotRetryATableThatIsReallyMissing` confirms.
Could you share the setup where Hop stayed broken until a restart? Without
one, it would be good to check with @mattcasters whether #9107 still applies
before we add this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]