Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Refactor internal APIs around concurrency to support mock implementations that are able to control execution, including
    • SimpleCondition, Semaphore, CountDownLatch, BlockingQueue, etc
    • Executors, futures, starting threads, etc - including important improvements to consistency of approach in the codebase
    • The use of currentTimeMillis and nanoTime
    • The replacement of java.io.File with a wrapper on java.nio.files.Path providing an ergonomic API, and some improvements to consistency of file handling
    • Support for alternative streaming implementations
    • Improvements to the dtest API to support necessary functionality
  • Introduction of a simulator package, containing
    • Mock implementations of all systems that control event ordering, including those mentioned above; and
      • Object monitors
      • Network messages
    • Intercept monitor entry/exit and control when these occur
    • Intercept the invocation of certain global methods we mock the implementation of
    • Replace certain non-deterministic constructs with deterministic ones, such as IdentityHashMap, Object.hashCode(), Enum.hashCode()
    • Pseudo-randomly pause thread execution either side of important (ordinarily non-blocking) synchronisation events, such as atomic field updating, volatile field access, etc
    • Mock implementations of all systems that control event ordering, including those mentioned above; and
    • A framework for intercepting events on these mock systems and translating them into events to be scheduled and evaluated in arbitrary order
    • A system for orchestrating random modifications to cluster topology that should not affect the correctness of operations on the system (initially this will be quite strict as to how these events occur, given Cassandra’s present weakness in performing these reliably)
    • Byte weaving class loaders for modifying execution to:
      • Intercept monitor entry/exit and control when these occur
      • Intercept the invocation of certain global methods we mock the implementation of
      • Replace certain non-deterministic constructs with deterministic ones, such as IdentityHashMap, Object.hashCode(), Enum.hashCode()
      • Pseudo-randomly pause thread execution either side of important (ordinarily non-blocking) synchronisation events, such as atomic field updating, volatile field access, etc
  • Introduction of test cases using the new facilities, including
    • A linearizability verifier for LWTs
    • Unit test to expose concurrency bugs in an individual class

...