commit | bd699e61d729f327b5de302089d11bc3dcadfeb8 | [log] [tgz] |
---|---|---|
author | mtang01 <49574764+mtang01@users.noreply.github.com> | Mon Apr 29 19:31:04 2019 -0700 |
committer | Sijie Guo <guosijie@gmail.com> | Tue Apr 30 10:31:04 2019 +0800 |
tree | de90f6bce4ec182a4059f752fd14e4a26e055e23 | |
parent | 7c62e1232cf8063d3b0f0dc59978da69710602b5 [diff] |
ISSUE #2067: reduce byte[] allocation in add entry Descriptions of the changes in this PR: This change removes a byte[] copy in DigestManager digest calculation (computeDigestAndPackageForSending) that puts crc header and payload in a continuous buffer. Instead, it uses protobuf ByteString.concat to concatenate header and payload without copy when building protobuf message. ### Motivation In add entry code path, I see lots of byte[] allocated to do digest calculation. It's possible to not allocate byte[]. ### Changes Don't allocate a ByteBuf to copy data. Keep header and data separate, but use ByteString.concat when construct protobuf message. Master Issue: #2067 Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org> This closes #2068 from mtang01/add_entry_mem, closes #2067
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:
You can also read Turning Ledgers into Logs to learn how to turn ledgers into continuous log streams. If you are looking for a high level log stream API, you can checkout DistributedLog.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.
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 Developer Setup to get your local environment setup.
Take a look at our open issues: JIRA Issues Github Issues.
Review our coding style and follow our pull requests to learn about our conventions.
Make your changes according to our contribution guide.