This is an automated email from the ASF dual-hosted git repository.
chenhang 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 39a9c281a6 Fix the 3141 revert issue (#3283)
39a9c281a6 is described below
commit 39a9c281a6ab329ba1aa8fb232ce81c2ad6719cc
Author: xiaolong ran <[email protected]>
AuthorDate: Tue Jul 26 23:22:07 2022 +0800
Fix the 3141 revert issue (#3283)
Signed-off-by: xiaolongran <[email protected]>
### 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.
---
.../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) {