fix cache lock

This commit is contained in:
2025-01-02 22:16:19 +01:00
parent a143648c46
commit 2fe3cfc3f8

View File

@@ -102,8 +102,10 @@ public class CachingObjectPersistentStore {
public void commitTx(TxManifest names) {
// During commit, readObject shouldn't be called for these items,
// it should be handled by the upstream store
for (var key : Stream.concat(names.written().stream(), names.deleted().stream()).toList()) {
_cache.remove(key);
synchronized (_cache) {
for (var key : Stream.concat(names.written().stream(), names.deleted().stream()).toList()) {
_cache.remove(key);
}
}
delegate.commitTx(names);
}