ehcache/ehcache3

Code rollback issues

toplifangkai opened this issue · 0 comments

BatchingLocalHeapWriteBehindQueue:
public void run() {
List<BatchOperation<K, V>> batches = createMonomorphicBatches(operations());
// execute the batch operations
for (BatchOperation<K, V> batch : batches) {
try {
try {
batch.performOperation(cacheLoaderWriter);
} finally {
try {
for (K key : batch.getKeys()) {
latest.remove(key);
}
} finally {
LOGGER.debug("Cancelling batch expiry task");
expireTask.cancel(false);
}
}
}
catch (Exception ex) {
for (K key : batch.getKeys()) {
keyCleanUpMethod.accept(key);
}
LOGGER.warn("Exception while bulk processing in write behind queue", ex);
}
}
}

new: in master and since tag v3.10.9-internal9
for (K key : batch.getKeys()) { latest.remove(key); }
before:
for (SingleOperation<K, V> op : operations()) { latest.remove(op.getKey(), op); }

I would like to know why you changed it back. Are there any special considerations? Thank you!