Skip to content

Commit 7018ea1

Browse files
committed
log
1 parent 67a6ac2 commit 7018ea1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndex.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,13 @@ public EntryLocationIndex(ServerConfiguration conf, KeyValueStorageFactory stora
6868

6969
@Override
7070
public void close() throws IOException {
71+
long start = System.currentTimeMillis();
72+
log.info("Closing EntryLocationIndex");
7173
while (!compacting.compareAndSet(false, true)) {
7274
// Wait till the locationsDb stops compacting
75+
if ((System.currentTimeMillis() - start) % 1000 == 0) {
76+
log.info("Waiting the locationsDb stops compacting");
77+
}
7378
try {
7479
Thread.sleep(100);
7580
} catch (InterruptedException e) {
@@ -78,6 +83,7 @@ public void close() throws IOException {
7883
}
7984
}
8085
locationsDb.close();
86+
log.info("Closed EntryLocationIndex cost: {} mills", System.currentTimeMillis() - start);
8187
}
8288

8389
public long getLocation(long ledgerId, long entryId) throws IOException {

0 commit comments

Comments
 (0)