You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2023/03/16 16:28:43 UTC

[GitHub] [bookkeeper] horizonzy opened a new pull request, #3872: Add log for entry log file delete.

horizonzy opened a new pull request, #3872:
URL: https://github.com/apache/bookkeeper/pull/3872

   When deleting the entry log file, we would better add a log for it.
   ```
   2023-03-17T00:25:02,069 - INFO  - [main:GarbageCollectorThread@748] - Entry log file 2 is empty, delete it from disk.
   ```


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

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


[GitHub] [bookkeeper] merlimat commented on a diff in pull request #3872: Add log for entry log file delete.

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on code in PR #3872:
URL: https://github.com/apache/bookkeeper/pull/3872#discussion_r1139452933


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -745,6 +745,7 @@ protected void extractMetaFromEntryLogs() throws EntryLogMetadataMapException {
                 EntryLogMetadata entryLogMeta = entryLogger.getEntryLogMetadata(entryLogId, throttler);
                 removeIfLedgerNotExists(entryLogMeta);
                 if (entryLogMeta.isEmpty()) {
+                    LOG.info("Entry log file {} is empty, delete it from disk.", entryLogId);

Review Comment:
   `entryLogId` is not directly the same (eg: it gets converted to hex)



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

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


[GitHub] [bookkeeper] horizonzy commented on pull request #3872: Add log for entry log file delete.

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on PR #3872:
URL: https://github.com/apache/bookkeeper/pull/3872#issuecomment-1473357580

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

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


[GitHub] [bookkeeper] horizonzy commented on pull request #3872: Add log for entry log file delete.

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on PR #3872:
URL: https://github.com/apache/bookkeeper/pull/3872#issuecomment-1473134438

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

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


[GitHub] [bookkeeper] hangc0276 commented on a diff in pull request #3872: Add log for entry log file delete.

Posted by "hangc0276 (via GitHub)" <gi...@apache.org>.
hangc0276 commented on code in PR #3872:
URL: https://github.com/apache/bookkeeper/pull/3872#discussion_r1139586505


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/directentrylogger/DirectEntryLogger.java:
##########
@@ -377,6 +381,9 @@ public boolean removeEntryLog(long entryLogId) {
         checkArgument(entryLogId < Integer.MAX_VALUE, "Entry log id must be an int [%d]", entryLogId);
         File file = logFile(ledgerDir, (int) entryLogId);
         boolean result = file.delete();
+        if (!result) {
+            LOG.warn("Could not delete entry log file {}", file);

Review Comment:
   Please use slog to print logs.



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

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


[GitHub] [bookkeeper] merlimat merged pull request #3872: Add log for entry log file delete.

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #3872:
URL: https://github.com/apache/bookkeeper/pull/3872


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

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