Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
ISPN-11975 RemoteCacheImpl entry retrieval should be non blocking

  1. … 52 more files in changeset.
ISPN-10373 Store/Loader Non blocking SPI

* Rework batch to allow for atomic write and remove

  1. … 24 more files in changeset.
ISPN-11685 Update to RxJava 3.0

  1. … 136 more files in changeset.
ISPN-10373 Store/Loader Non blocking SPI

* Added in new SPI

* PersistenceManagerImpl utilizes only new SPI

* Add in adapter for old SPI to new without changes

* DummyInMemoryStore converted to new SPI

* Async store converted to new SPI

* Added in BaseNonBlockingStore to be used by stores

    • -0
    • +763
    ./AsyncNonBlockingStore.java
  1. … 123 more files in changeset.
ISPN-11510 Convert detection of blocking or non blocking threads

  1. … 21 more files in changeset.
ISPN-10018 Coarse-grained logging categories

* Add categories for CONFIG, PERSISTENCE, SECURITY, CONTAINER

* Send all messages with log level >= INFO to the above

  1. … 174 more files in changeset.
ISPN-8192 Deprecate CollectionFactory

  1. … 65 more files in changeset.
ISPN-9846 Ensure Backwards Compatibility with Persistence SPI changes

Rename persistence.spi.MarshalledEntry to MarshallableEntry

MarshalledEntry and MarshalledEntryFactory methods in the spi deprecated

and default methods added for backwards-compatibility.

  1. … 143 more files in changeset.
ISPN-9693 Move MarshalledEntry and MarshalledEntryFactory to the persistence spi package

  1. … 133 more files in changeset.
ISPN-9332 REPL local iteration optimization cannot be used when store has write behind

* Also fixed async store segment filtering

* Also fixed clear losing later updates

  1. … 2 more files in changeset.
ISPN-8008 Add Fault-tolerance to write-behind stores

  1. … 11 more files in changeset.
ISPN-8865 Move AdvancedCacheLoader over to using Publisher instead of process

* Convert AdvancedAsyncCacheLoader

* Optimize code to not retrieve keys first

ISPN-5218 Add batching to the CacheWriter Interface.

  1. … 13 more files in changeset.
ISPN-7598 Improve logging of threads leaked by the tests

* Fix CompressedFileManager compressor flushing on shutdown

* Make DefaultThreadFactory Log created threads from the parent thread

* Fix TestNGTestListener to only log leaked threads once

* Include the node name in AsyncCacheWriter thread names

  1. … 7 more files in changeset.
ISPN-5683 Organized imports

  1. … 2823 more files in changeset.
ISPN-6297 Moved ConcurrentHashSet to commons

  1. … 10 more files in changeset.
ISPN-3938 AdvancedAsyncCacheLoader is now threadsafe

  1. … 1 more file in changeset.
ISPN-6002 Cache log.isTraceEnabled() as much as possible

  1. … 108 more files in changeset.
ISPN-5563 AsyncStoreTest: test more thoroughly that load() is in sync with changes

That load() sometimes doesn't see changes that have been written to the

AsyncCacheWriter (former AsyncStore) was the root cause of ISPN-1174.

Fix the tests that still assume that "waiting" on changes to appear in

the CacheLoader is correct behaviour.

Testing the basic operations repeatedly instead of just adding 1,000

entries once also shows that the issue is still not completely fixed with

redesign of the AsyncStore (ISPN-2293). Note: this removes trace output

from doTestPut() / doTestClear() so that tests don't time out if executed

repeatedly.

Signed-off-by: Karsten Blees <blees@dcon.de>

  1. … 1 more file in changeset.
ISPN-5563 AsyncStoreTest: test more thoroughly that load() is in sync with changes

That load() sometimes doesn't see changes that have been written to the

AsyncCacheWriter (former AsyncStore) was the root cause of ISPN-1174.

Fix the tests that still assume that "waiting" on changes to appear in

the CacheLoader is correct behaviour.

Testing the basic operations repeatedly instead of just adding 1,000

entries once also shows that the issue is still not completely fixed with

redesign of the AsyncStore (ISPN-2293). Note: this removes trace output

from doTestPut() / doTestClear() so that tests don't time out if executed

repeatedly.

Signed-off-by: Karsten Blees <blees@dcon.de>

  1. … 1 more file in changeset.
ISPN-5559 AsyncCacheWriter: on shutdown, wait until all changes have been written

AsyncCacheWriter.stop() may currently return before all data has been

written to the back-end store. PersistenceManager will then call stop() on

the back-end store, leading to data loss.

Similar to PassivationManager, AsyncCacheWriter should write all data to

the back-end store, no matter how long it takes.

This is consistent with the recommendation in the AsyncStoreConfiguration

documentation to set a very large timeout. However, the initialization

code currently prevents reasonable timeout settings with an error message.

Remove all timed waits and the respective shutdownTimeout option.

Signed-off-by: Karsten Blees <blees@dcon.de>

  1. … 1 more file in changeset.
ISPN-5559 AsyncCacheWriter: on shutdown, wait until all changes have been written

AsyncCacheWriter.stop() may currently return before all data has been

written to the back-end store. PersistenceManager will then call stop() on

the back-end store, leading to data loss.

Similar to PassivationManager, AsyncCacheWriter should write all data to

the back-end store, no matter how long it takes.

This is consistent with the recommendation in the AsyncStoreConfiguration

documentation to set a very large timeout. However, the initialization

code currently prevents reasonable timeout settings with an error message.

Remove all timed waits and the respective shutdownTimeout option.

Signed-off-by: Karsten Blees <blees@dcon.de>

  1. … 1 more file in changeset.
ISPN-5564 AsyncCacheWriter: stop() and clear(): don't wait for buffer space

stop() should take effect immediately, and clear() invalidates enqueued

changes rather than adding to them.

Make sure stop() and clear() don't block if the modification queue is full.

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5564 AsyncCacheWriter: stop() and clear(): don't wait for buffer space

stop() should take effect immediately, and clear() invalidates enqueued

changes rather than adding to them.

Make sure stop() and clear() don't block if the modification queue is full.

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5563 AsyncCacheWriter: fix race condition in State.get()

State.get() scans the states of the AsyncCacheWriter from head to tail,

while the AsyncStoreCoordinator may move conflicting entries from the

current state to the head state. If State.get() / AsyncCacheLoader.load()

is preempted after checking the head state, it may not see modifications

moved by the coordinator thread, and load data from the backend store

instead.

To prevent this from happening, we must not ever remove entries from the

State.modifications map.

Redesign AsyncStoreCoordinator: Instead of shifting conflicting keys to

the head state, collect them in a separate modifications list. Defer

execution of the respective AsyncStoreProcessors until after waiting for

the tail AsyncStoreProcessors to finish.

This has the additional advantage that conflicting keys don't add to the

head state's buffer count.

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5563 AsyncCacheWriter: fix race condition in State.get()

State.get() scans the states of the AsyncCacheWriter from head to tail,

while the AsyncStoreCoordinator may move conflicting entries from the

current state to the head state. If State.get() / AsyncCacheLoader.load()

is preempted after checking the head state, it may not see modifications

moved by the coordinator thread, and load data from the backend store

instead.

To prevent this from happening, we must not ever remove entries from the

State.modifications map.

Redesign AsyncStoreCoordinator: Instead of shifting conflicting keys to

the head state, collect them in a separate modifications list. Defer

execution of the respective AsyncStoreProcessors until after waiting for

the tail AsyncStoreProcessors to finish.

This has the additional advantage that conflicting keys don't add to the

head state's buffer count.

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5562 AsyncCacheWriter: fix stop() with concurrent clear()

clear() replaces the current head state, potentially resetting the stopped

flag that has been set by a concurrent stop() call.

Move the stopped flag to the AsyncCacheWriter to fix this.

In clear(), throw a CacheException if the store is stopped (similar to

write() / remove()).

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5562 AsyncCacheWriter: fix stop() with concurrent clear()

clear() replaces the current head state, potentially resetting the stopped

flag that has been set by a concurrent stop() call.

Move the stopped flag to the AsyncCacheWriter to fix this.

In clear(), throw a CacheException if the store is stopped (similar to

write() / remove()).

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5562 AsyncCacheWriter: don't lose data when the cache is stopped

There are two potential race conditions when stopping the AsyncCacheWriter:

1. Accessing State.stopped and State.modifications without synchronization

doesn't guarantee that the modifications list is really empty.

2. If keys in the first stopped state conflicted with keys in tail, we

need to process the head state as well.

Make sure that no data is lost by handing off the stopped state to the

coordinator thread while holding the readLock(), and process it just as

any other state.

Signed-off-by: Karsten Blees <blees@dcon.de>

ISPN-5562 AsyncCacheWriter: don't lose data when the cache is stopped

There are two potential race conditions when stopping the AsyncCacheWriter:

1. Accessing State.stopped and State.modifications without synchronization

doesn't guarantee that the modifications list is really empty.

2. If keys in the first stopped state conflicted with keys in tail, we

need to process the head state as well.

Make sure that no data is lost by handing off the stopped state to the

coordinator thread while holding the readLock(), and process it just as

any other state.

Signed-off-by: Karsten Blees <blees@dcon.de>