Conversation
beejmaxx
force-pushed
the
fix/native-response-compression
branch
from
September 25, 2026 10:52
476a4c4 to
25ee5f9
Compare
beejmaxx
marked this pull request as ready for review
September 25, 2026 10:57
This file contains hidden or 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
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.
Problem
SetCompressionMethod(CompressionMethod::ZSTD)compresses blocks sent by the client with ZSTD, but the native Query packet carries only a boolean compression flag, not a codec name. The server chooses its response codec fromnetwork_compression_method, which this client does not send. A server configured for LZ4 can therefore return LZ4 blocks to a client configured for ZSTD. The client decodes them successfully, so the mismatch is silent.Change
For LZ4 or ZSTD, send the corresponding
network_compression_methodwith each query when the caller has not set it explicitly. Preserve the caller's setting and flags. Do not add a setting when compression is disabled or the server revision is too old for string-serialized settings.Compatibility
This changes behavior for users whose server constrains
network_compression_method. For example, a readonly user whose permitted server codec differs from the configured client codec can now receive aREADONLYerror for a query that previously succeeded with the server's codec. The client propagates the server error. The caller can choose a permitted codec, disable compression, or supply an explicit permitted per-query setting where the API allows one.Verification
git diff --checkpassed. Bazel and Linux/Windows CI have not been run locally.Fixes #556.