You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by yo...@apache.org on 2022/08/01 13:44:56 UTC
[bookkeeper] 10/17: Fix the 3141 revert issue (#3283)
This is an automated email from the ASF dual-hosted git repository.
yong pushed a commit to branch branch-4.15
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit bd25e6bb9b28e936ac698170779b3ed7ddc5737c
Author: xiaolong ran <xi...@tencent.com>
AuthorDate: Tue Jul 26 23:22:07 2022 +0800
Fix the 3141 revert issue (#3283)
Signed-off-by: xiaolongran <xi...@tencent.com>
### Motivation
In #3144, we reverted the changes of #2686, but after the revert, the self-increment behavior of deletedEntries was also removed, resulting in deletedEntries No assignment, always 0.
In #2686
<img width="1501" alt="image" src="https://user-images.githubusercontent.com/20965307/169231903-1a0bee03-f602-4c61-9c98-6b832f75648f.png">
In #3144
<img width="1352" alt="image" src="https://user-images.githubusercontent.com/20965307/169232028-658a1182-d8c5-4cfa-8f39-2ed7416ee508.png">
### Changes
- Add `++deletedEntries` for removeOffsetFromDeletedLedgers.
(cherry picked from commit 39a9c281a6ab329ba1aa8fb232ce81c2ad6719cc)
---
.../org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java
index 41e021ac8c..468f268aab 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java
@@ -243,6 +243,7 @@ public class EntryLocationIndex implements Closeable {
}
batch.remove(keyToDelete.array);
++deletedEntriesInBatch;
+ ++deletedEntries;
}
if (deletedEntriesInBatch > DELETE_ENTRIES_BATCH_SIZE) {