apache / apache/bookkeeper

Update a dirty page

Open
#4,056 2 comments 0 reactions 0 assignees View on GitHub
type/question
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**QUESTION**

Recently I'm reading the code associates with how bookkeeper writes indexes for a ledger, and there is a piece of logic about grab an available LedgerEntryPage from cache.

image

image

image

image

step 1: Try to get a available page from listOfFreePages
step 2: reset the page
step 2.1: reset the metadata, including set the entryKey to new EntryKey(-1, -1)
step 2.2: put the LEP into lruCleanPageMap, note the key is new EntryKey(-1,-1)
step 3: Reassign the entryKey of LEP with new EntryKey(ledgerId, firstEntryId)
step 4: increment the use count and remove LEP with the reassigned entryKey, but it can't remove the page since the key is different.

We have a productive error about "Trying to update a dirty page" and I'm not sure it matters, would be appreciate if someone will reply on it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.