You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/12/25 03:28:25 UTC

[GitHub] [bookkeeper] hangc0276 opened a new pull request #2964: Skip update entryLogMetaMap if not modified

hangc0276 opened a new pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964


   ### Motivation
   After we support RocksDB backend entryMetaMap, we should avoid updating the entryMetaMap if unnecessary.
   
   In `doGcEntryLogs` method, it iterate through the entryLogMetaMap and update the meta if ledgerNotExists. We should check whether the meta has been modified in `removeIfLedgerNotExists`. If not modified, we can avoid update the  entryLogMetaMap.
   
   ### Modification
    1. Add a flag to represent whether the meta has been modified in `removeIfLedgerNotExists` method. If not, skip update the entryLogMetaMap.


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] hangc0276 commented on pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964#issuecomment-1001126986


   rerun failure checks


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] rdhabalia commented on a change in pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on a change in pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964#discussion_r778488908



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
##########
@@ -462,16 +463,23 @@ private void doGcEntryLogs() throws EntryLogMetadataMapException {
         this.numActiveEntryLogs = entryLogMetaMap.size();
     }
 
-    private void removeIfLedgerNotExists(EntryLogMetadata meta) throws EntryLogMetadataMapException {
+    private boolean removeIfLedgerNotExists(EntryLogMetadata meta) throws EntryLogMetadataMapException {
+        AtomicBoolean modified = new AtomicBoolean(false);

Review comment:
       you can use light weight `MutableBoolean` instead `AtomicBoolean`




-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] zymap merged pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
zymap merged pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964


   


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] hangc0276 commented on a change in pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on a change in pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964#discussion_r778500191



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
##########
@@ -462,16 +463,23 @@ private void doGcEntryLogs() throws EntryLogMetadataMapException {
         this.numActiveEntryLogs = entryLogMetaMap.size();
     }
 
-    private void removeIfLedgerNotExists(EntryLogMetadata meta) throws EntryLogMetadataMapException {
+    private boolean removeIfLedgerNotExists(EntryLogMetadata meta) throws EntryLogMetadataMapException {
+        AtomicBoolean modified = new AtomicBoolean(false);

Review comment:
       done




-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] hangc0276 commented on pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964#issuecomment-1001127056


   @rdhabalia @eolivelli @zymap Please help take a look, thanks.


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] hangc0276 commented on pull request #2964: Skip update entryLogMetaMap if not modified

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on pull request #2964:
URL: https://github.com/apache/bookkeeper/pull/2964#issuecomment-1001280917


   rerun failure checks


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org