apache / apache/bookkeeper

Bookie shutdown hook should trigger LedgerCacheImpl's indexPageManager flusher

Open
#1,535 0 comments 0 reactions 0 assignees View on GitHub
area/bookie area/tests triage/week-8 type/task
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**BUG REPORT**

1. Please describe the issue you observed:

As part of Bookie shutdown hook, InterleavedLedgerStorage.shutdown is called, which calls “entryLogger.shutdown()” and it flushes complete currentlogs and rotatedlogs. But in InterleavedLedgerStorage.shutdown for ledgercache, it calls “ledgerCache.close()” and it just flushes FileInfos but not in memory LedgerEntryPage instances. To be in sync with EntryLog files, indexPageManager (memory pages) should also be flushed.

https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java#L188

Contributor guide

Open the contributing guide

Research direction

Start in bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java at the shutdown path described in the issue. Trace how entryLogger.shutdown(), ledgerCache.close(), and LedgerCacheImpl's indexPageManager handle pending data. Done means shutdown flushes in-memory LedgerEntryPage instances so they are consistent with the EntryLog files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.