vaijosh commented on code in PR #3164:
URL: https://github.com/apache/hugegraph/pull/3164#discussion_r4024558796
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/business/BusinessHandlerImpl.java:
##########
@@ -138,6 +143,12 @@ public class BusinessHandlerImpl implements
BusinessHandler {
private static final ConcurrentMap<String, AtomicInteger> pathLock = new
ConcurrentHashMap<>();
private static final ConcurrentMap<Integer, AtomicInteger> compactionState
=
new ConcurrentHashMap<>();
+ // Guards the compactRange() window specifically, so a snapshot save can
atomically
+ // check-and-reserve against a compaction that is actually running right
now. This is
+ // narrower than pathLock, which stays held through the post-compaction
blank-task
+ // snapshot and must not be reused here to avoid deadlocking that flow.
+ private static final ConcurrentMap<Integer, ReentrantLock>
compactionRangeLock =
Review Comment:
Thanks @bitflicker64. I have fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]