Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0
-
Normal
-
Regression
Description
When not executing on a small device VM, Derby has been using the Java NIO classes java.nio.clannel.* for file io for extra concurrency.
If a thread is interrupted while executing blocking IO operations in NIO, the ClosedByInterruptException will get thrown. Unfortunately, Derby isn't current architected to retry and complete such operations (before passing on the interrupt), so the Derby database store can be left in an inconsistent state, although no data is corrupted, and we therefore have to return a database level error to perform shutdown and recovery. This means the applications can no longer access the database while a shutdown and reboot including a recovery is taking place.
It would be nice if Derby could somehow detect and finish IO operations underway when thread interrupts happen before passing the exception on to the application. Derby embedded is sometimes embedded in applications that use Thread.interrupt to stop threads.
Attachments
Attachments
Issue Links
- incorporates
-
DERBY-4960 Race condition in FileContainer#allocCache when reopening RAFContainer after interrupt
- Closed
-
DERBY-4974 InterruptResilienceTest fails on Solaris with Sun VMs prior to 1.6
- Closed
-
DERBY-4982 Retrying after interrupts in store pops a bug in derbyall/storeall/storeunit/T_RawStoreFactory in some cases
- Closed
-
DERBY-5223 Thread's interrupted flag not always preserved after Derby returns from JDBC API call
- Closed
-
DERBY-5233 Interrupt of create table or index (i.e. a container) will throw XSDF1 under NIO - connection survives
- Closed
-
DERBY-5312 InterruptResilienceTest failed with ERROR 40XD1: Container was opened in read-only mode.
- Closed
-
DERBY-5325 Checkpoint fails with ClosedChannelException in InterruptResilienceTest
- Closed
-
DERBY-5152 Shutting down db, information that the thread received an interrupt will not be restored to thread's interrupt flag
- Closed
-
DERBY-5333 Intermittent assert failure in testInterruptShutdown: thread's interrupted flag lost after shutdown
- Closed
-
DERBY-4963 Revert to FileDescriptor#sync from FileChannel#force to improve interrupt resilience
- Closed
-
DERBY-4967 Handle interrupt received while waiting for database lock
- Closed
-
DERBY-4968 Let query stop execution if an interrupt is seen, at same time as we check the query timeout
- Closed
-
DERBY-5024 Document the behavior of interrupt handling.
- Closed
- is related to
-
DERBY-3746 java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
- Open
-
DERBY-151 Thread termination -> XSDG after operation is 'complete'
- Closed
-
DERBY-4911 restoreIntrFlagIfSeen may throw ShutdownException causing confusing console stack trace at server shutdown
- Closed