You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/11/05 15:33:12 UTC
[GitHub] [bookkeeper] 1559924775 opened a new pull request, #3611: Fix the problem that the abnormal file causes the bookie GC fail
1559924775 opened a new pull request, #3611:
URL: https://github.com/apache/bookkeeper/pull/3611
Descriptions of the changes in this PR:
Motivation
When bookie GC encounters an entryLog file with disordered data, a IllegalArgumentException are not caught, resulting in the death of the GC thread and the end of the GC process.
This problem is encountered again in the next GC, resulting in the subsequent entrylog being unable to GC.
The problem described in this issue(https://github.com/apache/bookkeeper/issues/3604) will cause the entryLog file to be disordered, and will cause the IllegalArgumentException when parsing the entrylog file.
Master Issue:
https://github.com/apache/bookkeeper/issues/3607 : Describes the problem to be solved by this pr.
https://github.com/apache/bookkeeper/issues/3604 : Describes the phenomenon and causes of disordered entrylog files.
--
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] 1559924775 commented on a diff in pull request #3611: [branch-4.14] Fix the problem that the abnormal file causes the bookie GC fail
Posted by GitBox <gi...@apache.org>.
1559924775 commented on code in PR #3611:
URL: https://github.com/apache/bookkeeper/pull/3611#discussion_r1027505865
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java:
##########
@@ -1000,6 +1000,11 @@ public void scanEntryLog(long entryLogId, EntryLogScanner scanner) throws IOExce
long offset = pos;
pos += 4;
int entrySize = headerBuffer.readInt();
+ if (entrySize <= 0) { // hitting padding
Review Comment:
Skip and continue to read the next entry.
See "scanner.accept(ledgerId)" in line 1011.
The code is consistent with version 4.16.
--
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] zymap commented on a diff in pull request #3611: [branch-4.14] Fix the problem that the abnormal file causes the bookie GC fail
Posted by GitBox <gi...@apache.org>.
zymap commented on code in PR #3611:
URL: https://github.com/apache/bookkeeper/pull/3611#discussion_r1021025279
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java:
##########
@@ -1000,6 +1000,11 @@ public void scanEntryLog(long entryLogId, EntryLogScanner scanner) throws IOExce
long offset = pos;
pos += 4;
int entrySize = headerBuffer.readInt();
+ if (entrySize <= 0) { // hitting padding
Review Comment:
Is it possible the entrySize is normal but the ledgerId is abnormal?
--
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 a diff in pull request #3611: [branch-4.14] Fix the problem that the abnormal file causes the bookie GC fail
Posted by GitBox <gi...@apache.org>.
horizonzy commented on code in PR #3611:
URL: https://github.com/apache/bookkeeper/pull/3611#discussion_r1069133187
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java:
##########
@@ -1000,6 +1000,11 @@ public void scanEntryLog(long entryLogId, EntryLogScanner scanner) throws IOExce
long offset = pos;
pos += 4;
int entrySize = headerBuffer.readInt();
+ if (entrySize <= 0) { // hitting padding
Review Comment:
I think it can't resolve the disorder problem. After this pr, could you parse the entry file incorrectly?
--
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 merged pull request #3611: [branch-4.14] Fix the problem that the abnormal file causes the bookie GC fail
Posted by GitBox <gi...@apache.org>.
hangc0276 merged PR #3611:
URL: https://github.com/apache/bookkeeper/pull/3611
--
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