Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Quality Assurance
-
Normal
-
All
-
None
-
Description
To support CEP-10 it is necessary to support alternative implementations of the blocking concurrency primitives we use on the project. At the same time, the project is very inconsistent in its usage of these APIs, so this work includes a number of improvements to the coherency of the codebase.
This ticket introduces new abstractions and standardises old ones, migrating all blocking concurrency operations besides Futures returned by Executors to these new APIs. This includes a migration of SimpleCondition to a new Conditioninterface, new CountDownLatch and Semaphore interfaces, and new static factory methods for creating these objects (as well as WaitQueue) that can be intercepted by byte weaving. Additionally the internal Netty Future implementation is improved to support more general use (though this is only fully realised in a later ticket), OpOrder is improved to more easily support mocking WaitQueue.
Finally we standardise the propagation of InterruptedExecption, with the new UncheckedInterruptedException, so that simulations may be terminated cleanly.
Attachments
Issue Links
- causes
-
CASSANDRA-17928 Test Failure: org.apache.cassandra.db.commitlog.CommitLogInitWithExceptionTest.testCommitLogInitWithException-compression
- Resolved
-
CASSANDRA-20084 WaitQueue.Signal.awaitUninterruptibly() may stuck forever if the invoking thread is interrupted
- Patch Available
- is a child of
-
CASSANDRA-16922 CEP-10: Major Prerequisites (Phase 1)
- Resolved