[
https://issues.apache.org/jira/browse/BOOKKEEPER-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505905#comment-13505905
]
Flavio Junqueira commented on BOOKKEEPER-249:
---------------------------------------------
Here is a thought for dealing with zombie entries. We could keep for each
bookie Bi, under '/ledgers/deleted/Bi', a znode containing the largest id (LL)
of a ledger that the bookie has deleted. This way the bookie can check in each
garbage-collection cycle if it has entries for a ledger L < LL. In this case,
the bookie deletes those ledgers.
Let me give an example to illustrate. Say a bookie stores fragments for ledgers
L1,L5,L6 and a client deletes L1 and L5. When it runs a gc cycle, it deletes L1
and L5 and writes to znode '/ledgers/deleted/Bi/Largest' the value L5.
Eventually, another client deletes L6, the bookie deletes L6 and sets the data
of '/ledgers/deleted/Bi/Largest' to L6. While checking the entries that it has
stored, Bi finds that it has entries for a ledger with id smaller than 6, say
L5, then it is safe to delete the entries.
What do you think, Sijie?
> Revisit garbage collection algorithm in Bookie server
> -----------------------------------------------------
>
> Key: BOOKKEEPER-249
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-249
> Project: Bookkeeper
> Issue Type: Improvement
> Components: bookkeeper-server
> Reporter: Sijie Guo
> Fix For: 4.2.0
>
> Attachments: gc_revisit.pdf
>
>
> Per discussion in BOOKKEEPER-181, it would be better to revisit garbage
> collection algorithm in bookie server. so create a subtask to focus on it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira