mattcasters opened a new pull request, #8570:
URL: https://github.com/apache/hop/pull/8570

   Stopping a workflow that uses a Caching Database execution information 
location left the cache timer writing through a JDBC connection that was 
already closed. Hop then logged `This connection has been closed` on every 
timer tick (`SELECT 1 FROM "HOP_EXECUTIONS"."HOP_EXECUTIONS" WHERE "id" = ?`, 
from `rowExists` → `manageCache`).
   
   The location held one connection for the whole run. A workflow stop can 
close that connection (a transactional run closes every connection that joined 
the transaction, and an earlier finished listener can skip the normal shutdown) 
while the one-second cache timer keeps running.
   
   This change:
   
   - Keeps the execution-info connection out of the workflow transaction and on 
auto-commit, so a stop does not close it.
   - Opens a new connection and retries once when a read or write finds the 
JDBC connection already closed.
   - Cancels the cache timer on close and on a second initialize, and ignores 
timer ticks after close. The same failure is logged once, not every second.
   - Always closes the location when a local workflow run returns, even if an 
earlier finished listener throws. Closing twice is safe.
   
   fixes #8568
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   - [x] Run `mvn clean install apache-rat:check` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
   - [x] If you have a group of commits related to the same change, please 
squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).


-- 
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]

Reply via email to