AnonHxy commented on code in PR #4706:
URL: https://github.com/apache/bookkeeper/pull/4706#discussion_r2728149221


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java:
##########
@@ -203,15 +218,17 @@ public String getEntryLocationDBPath() {
 
     public void compact() throws IOException {
         try {
-            isCompacting = true;
+            if (!compacting.compareAndSet(false, true)) {

Review Comment:
   Yes. It's the root cause.   We should cancel the compacting if we have 
closed the DB,  or we should delay closing the DB if we have already been in 
compaction status.  So here we need an atomic variable to serve as a flag for 
the DB status. @StevenLuMT 
   
   



-- 
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]

Reply via email to