commit | 24464ba428d9c93a18c3edf74be5c32759bdce1e | [log] [tgz] |
---|---|---|
author | Hang Chen <chenhang@apache.org> | Mon Jan 08 11:43:07 2024 +0800 |
committer | GitHub <noreply@github.com> | Mon Jan 08 11:43:07 2024 +0800 |
tree | f970b4ded9e9a7bbcf062b9cb9f6f02cdbf56a99 | |
parent | 787d9b23018d7b10e40a307032eeb0d3fc5287d0 [diff] |
Skip sync the RocksDB when no changes (#3904) Co-authored-by: Matteo Merli <mmerli@apache.org> ### Motivation For the `LedgerMetadataIndex#removeDeletedLedgers` and `LedgerMetadataIndex#flush`, it will call ledgersDB sync whether the ledgersDB has changed or not. We can skip the sync call when nothing changed in the ledgersDB. ### Changes - Check whether pendingLedgersUpdates is empty in `flush()` and `pendingDeletedLedgers` is empty in removeDeletedLedgers - Move the `key.recycle()` in finally to cover keys leak when the ledgersDB operations throw an exception.
Apache BookKeeper is a scalable, fault-tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
Please visit the Documentation from the project website for more information.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a GitHub issue.
Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.
Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See our installation guide to get your local environment setup.
Take a look at our open issues: GitHub Issues.
Review our coding style and follow our pull requests to learn more about our conventions.
Make your changes according to our contributing guide