yuva2achieve / solidbase

Automatically exported from code.google.com/p/solidbase
Apache License 2.0
0 stars 0 forks source link

Can we prevent a ctrl-c in between the execution of a change and the subsequent update of DBVERSION? #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Can we use

Runtime.getRuntime().addShutdownHook()

for this?

Delay shutdown till the change and the update of DBVERSION is complete?

Original issue reported on code.google.com by rene.de....@gmail.com on 17 May 2010 at 11:59

GoogleCodeExporter commented 9 years ago
What I really mean is: after the change is complete and committed (DDL always 
does 
autocommit), after returning from the executeUpdate() call, CTRL-C should be 
blocked 
until the update of the DBVERSION tables is committed.

So an update in progress should still be allowed to be aborted with a CTRL-C.

This will seriously reduce inconsistencies and increase restartability.

Original comment by rene.de....@gmail.com on 6 Jun 2010 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by rene.de....@gmail.com on 7 Jun 2010 at 3:26

GoogleCodeExporter commented 9 years ago
Fixed by rev 505.

Original comment by rene.de....@gmail.com on 9 Oct 2010 at 6:38

GoogleCodeExporter commented 9 years ago
Reopen, the unit tests hang sometimes.
Solution would be that the main thread creates a worker thread to do the work 
and the shutdown hook thread to react to the SIGTERM signal.
This way, they are siblings, and not parent/child, which means that the 
ShutdownHook thread is able to interrupt the worker thread and then join it 
(that didn't work with the main thread because the main thread waits for other 
thread, and then you get a deadlock).

Original comment by rene.de....@gmail.com on 9 Oct 2010 at 8:52

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r507.

Original comment by rene.de....@gmail.com on 9 Oct 2010 at 10:55