apache / apache/bookkeeper

Re-replicator: bookie checking should handle flapping bookie registration

Open
#587 2 comments 0 reactions 0 assignees View on GitHub
jiramigrated triage/week-33 type/task
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

JIRA: https://issues.apache.org/jira/browse/BOOKKEEPER-960

Reporter: Yiming Zang

Problem:

currently re-replicator only uses the view of available/readonly bookies right at the time doing bookie checking. it would accidentally treat a bookie disappeared from zookeeper (e.g. zookeeper session expired, bookie restarted, flapping bookie registration due to network/gc) as lost bookies, which introduce unnecessary re-replication.

Solution:

introduce 'auditorStaleBookieInterval', if a bookie never register in the given interval, it would be marked as 'stale' bookies and re-replicate all ledgers belongs to that bookie. the default value is set 30 minutes.

Fixes:

- refactor bookie watcher to allow notifying bookie list thru BookiesListener
- introduce 'auditorStaleBookieInterval' to be able to mark bookies as 'stale' if bookies aren't registered themselves to zookeeper
- add more info logging about critical steps on re-replication logic
- misc changes

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.