-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor checksum collection writing and usage #14175
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of constructing a byte array with byte output stream and writers, and then later writing again to a stream, we no get an OutputStream in and write directly to the stream
npepinpe
approved these changes
Sep 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Just one comment, but no need for another review
snapshot/src/main/java/io/camunda/zeebe/snapshots/impl/SnapshotChecksum.java
Outdated
Show resolved
Hide resolved
snapshot/src/main/java/io/camunda/zeebe/snapshots/impl/SnapshotChecksum.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Nicolas Pepin-Perreault <43373+npepinpe@users.noreply.github.com>
bors r+ |
zeebe-bors-camunda bot
added a commit
that referenced
this pull request
Sep 6, 2023
14175: Refactor checksum collection writing r=Zelldon a=Zelldon ## Description Instead of constructing a byte array with byte output stream and writers, and then later writing again to a stream, we no get an OutputStream in and write directly to the stream <!-- Please explain the changes you made here. --> ## Related issues <!-- Which issues are closed by this PR or are related --> related #14045 Co-authored-by: Christopher Zell <zelldon91@googlemail.com> Co-authored-by: Christopher Kujawa (Zell) <zelldon91@googlemail.com>
Build failed: |
Useful, if we want to avoid re-reading files etc.
Should allow to use pre calculated checksums, instead of always recalculating the value.
New persist method accepts SFV checksum, but needs to be reworked that we not recalculate value.
bors r+ |
Reuse already created checksum collections on persist
Canceled. |
bors r+ |
Zelldon
changed the title
Refactor checksum collection writing
Refactor checksum collection writing and usage
Sep 6, 2023
zeebe-bors-camunda bot
added a commit
that referenced
this pull request
Sep 6, 2023
14175: Refactor checksum collection writing and usage r=Zelldon a=Zelldon ## Description The first part of PR: Instead of constructing a byte array with byte output stream and writers, and then later writing again to a stream, we now get an OutputStream in and write directly to the stream Additionally PR contains #14184 - Support to update the checksum collection from bytes, which might be received or read from the file already. This is useful, if we want to avoid re-reading files etc. - Support to persist snapshot with given checksum collection. - collection of checksum is no longer recreated and directly written to the directory. <!-- Please explain the changes you made here. --> ## Related issues <!-- Which issues are closed by this PR or are related --> related #14045 Co-authored-by: Christopher Zell <zelldon91@googlemail.com> Co-authored-by: Christopher Kujawa (Zell) <zelldon91@googlemail.com>
Build failed: |
bors r+ |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The first part of PR:
Instead of constructing a byte array with byte output stream and writers, and then later writing again
to a stream, we now get an OutputStream in and write directly to the stream
Additionally PR contains #14184
Related issues
related #14045
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.
Please refer to our review guidelines.