This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 175e29407e Fix: Garbage collection stuck on corrupt entry log file
(#4544)
175e29407e is described below
commit 175e29407ece25fbb50d52afbcca384f2182e058
Author: Andrey Yegorov <[email protected]>
AuthorDate: Thu Feb 13 11:41:21 2025 -0800
Fix: Garbage collection stuck on corrupt entry log file (#4544)
---
.../org/apache/bookkeeper/bookie/GarbageCollectorThread.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
index 5126e79802..25c42e8e4e 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
@@ -823,8 +823,13 @@ public class GarbageCollectorThread implements Runnable {
entryLogMetaMap.put(entryLogId, entryLogMeta);
}
} catch (IOException | RuntimeException e) {
- LOG.warn("Premature exception when processing " + entryLogId
- + " recovery will take care of the problem", e);
+ LOG.warn("Premature exception when processing {} recovery will
take care of the problem",
+ entryLogId, e);
+ } catch (OutOfMemoryError oome) {
+ // somewhat similar to
https://github.com/apache/bookkeeper/pull/3901
+ // entrylog file can be corrupted but instead having a
negative entry size
+ // it ends up with very large value for the entry size causing
OODME
+ LOG.warn("OutOfMemoryError when processing {} - skipping the
entry log", entryLogId, oome);
}
}
}