Skip to content

[bk-server] Clean up over-replicated ledgers owned by different bookies - #2119

Merged
eolivelli merged 2 commits into
apache:masterfrom
rdhabalia:overRepl
Jul 12, 2019
Merged

eolivelli merged 2 commits into
apache:masterfrom
rdhabalia:overRepl

Conversation

@rdhabalia

@rdhabalia rdhabalia commented Jun 28, 2019 •

Copy link
Copy Markdown
Contributor

Motivation

As described at: apache/pulsar#4632

  • Sometimes due to overreplication, bookie contains ledgers which are not owned by that bookie anymore and that bookie is not part of the ensemble-list of those ledgers. In this case, GC finds out those overreplicated ledgers and
  • deletes their index from dbStorage (rocksDB) and
  • tries to delete them from entrylog files.

However, bookie doesn't delete them from entry-log files due to change made in #870 where bookie avoids deleting ledger if znode of that ledger exists.

Because of that bookie ends up storing large number entrylog files with ledgers which are owned by different bookies. It also cause OOM when GC tries to deal with large number of entry log files.

Modification

Delete the ledgers if bookie is not part of ensemble list of over-replicated ledgers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants