-
Notifications
You must be signed in to change notification settings - Fork 86
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
[client-common] Added safeguard for compressor #1307
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
Today, the `compress`/`decompress` can still be invoked even the compressor is closed already and for zstd based compressor, it would crash. This PR add some safeguard and fail fast if the compressor is already closed.
...nal/venice-client-common/src/main/java/com/linkedin/venice/compression/VeniceCompressor.java
Show resolved
Hide resolved
...nal/venice-client-common/src/main/java/com/linkedin/venice/compression/VeniceCompressor.java
Outdated
Show resolved
Hide resolved
sixpluszero
previously approved these changes
Nov 15, 2024
...nal/venice-client-common/src/main/java/com/linkedin/venice/compression/VeniceCompressor.java
Outdated
Show resolved
Hide resolved
majisourav99
previously approved these changes
Nov 15, 2024
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.
Thanks Gaojie
FelixGV
reviewed
Nov 15, 2024
...nal/venice-client-common/src/main/java/com/linkedin/venice/compression/VeniceCompressor.java
Show resolved
Hide resolved
FelixGV
approved these changes
Nov 15, 2024
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.
Thanks!
gaojieliu
added a commit
to gaojieliu/venice
that referenced
this pull request
Nov 15, 2024
* [client-common] Added safeguard for compressor Today, the `compress`/`decompress` can still be invoked even the compressor is closed already and for zstd based compressor, it would crash. This PR add some safeguard and fail fast if the compressor is already closed. * Fixed integration test failures * Minor tweak * Added a unit test * Fixed minor comment * Skipped locking for NoopCompressor
gaojieliu
added a commit
that referenced
this pull request
Nov 15, 2024
* [server] SN read quota versioned stats not initialized after restart (#1312) The currentVersion and backupVersion of ServerReadQuotaUsageStats are not set after server restart because handleStoreChanged is invoked for all stores when the store repo undergoing refresh before we initialize and register store change listener in ReadQuotaEnforcementHandler (part of the ListenerService). As a result metrics that depend on current and backup versions will not show up properly until store is updated. The fix is to during initialization of ReadQuotaEnforcementHandler we will invoke handleStoreChanged for all stores after we register store change listener. The bug is actually reproducible in existing integration test. However, it was not caught because the test was broken/misconfigured... * [client-common] Added safeguard for compressor (#1307) * [client-common] Added safeguard for compressor Today, the `compress`/`decompress` can still be invoked even the compressor is closed already and for zstd based compressor, it would crash. This PR add some safeguard and fail fast if the compressor is already closed. * Fixed integration test failures * Minor tweak * Added a unit test * Fixed minor comment * Skipped locking for NoopCompressor --------- Co-authored-by: Xun Yin <[email protected]>
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.
Summary, imperative, start upper case, don't end with a period
Today, the
compress
/decompress
can still be invoked even the compressor is closed already and for zstd based compressor, it would crash.This PR add some safeguard and fail fast if the compressor is already closed.
How was this PR tested?
Will work on the unit test
Does this PR introduce any user-facing changes?