Initial implementation of SCYLLA_USE_METADATA_ID feature#599
Merged
dkropachev merged 14 commits intoscylladb:scylla-4.xfrom Oct 2, 2025
Merged
Initial implementation of SCYLLA_USE_METADATA_ID feature#599dkropachev merged 14 commits intoscylladb:scylla-4.xfrom
SCYLLA_USE_METADATA_ID feature#599dkropachev merged 14 commits intoscylladb:scylla-4.xfrom
Conversation
3760023 to
22254de
Compare
40d49d1 to
2feab3c
Compare
SCYLLA_USE_METADATA_ID feature neg…SCYLLA_USE_METADATA_ID feature
dkropachev
requested changes
Sep 18, 2025
core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/internal/core/protocol/MetadataIdInfo.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/internal/core/protocol/MetadataIdInfo.java
Outdated
Show resolved
Hide resolved
core/src/test/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandlerTest.java
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/internal/core/channel/ChannelFactory.java
Outdated
Show resolved
Hide resolved
1979ab1 to
a4e60af
Compare
86585ce to
b428ac1
Compare
9122cf0 to
27d7a77
Compare
dkropachev
requested changes
Sep 25, 2025
dkropachev
left a comment
There was a problem hiding this comment.
Small changes, please cleanup commit history after you done.
core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
Outdated
Show resolved
Hide resolved
SCYLLA_USE_METADATA_ID featureSCYLLA_USE_METADATA_ID feature
27d7a77 to
850cc81
Compare
dkropachev
reviewed
Oct 2, 2025
core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
Outdated
Show resolved
Hide resolved
|
There is definitely a problem, I have restarted it three times, got same result |
dkropachev
approved these changes
Oct 2, 2025
61eac1b to
28b25fe
Compare
…ture negotiation during driver startup 🚀 # Conflicts: # core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
…Features` to `FrameEncoder` and `FrameDecoder` constructors. Updating integration tests.
# Conflicts: # core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java # core/src/main/java/com/datastax/oss/driver/internal/core/channel/ProtocolInitHandler.java
…Level.LOCAL_ONE` in `ProfileIT`.
…s` (used in `OsgiGeoTypesIT` & `OsgiGraphIT`).
Co-authored-by: Dmitry Kropachev <[email protected]>
…lding of protocol features to `ProtocolFeatureStore`.
…lifying unit tests.
28b25fe to
3e967d7
Compare
FYI, this problem exists on main branch, it is not specific to this PR. |
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.
Issue scylla-driver#81
repared statements invalidation used to be completely broken, you can read details on it here
Recently core merged PR that fixes problems for select statements.
After that PR, if driver supply
SCYLLA_USE_METADATA_IDat the startup, when statements is prepared server hands out result queries metadata hash.When driver executes this query it sends metadata id alongside with the request.
Server checks driver metadata id and what it has on its side, if there is any difference it will send new metadata and metadata id.
Driver suppose to pick it up and update metadata and metadata id on it's side, before deserializing response, solving issue with having outdated metadata on driver side.
Unfortunately it is solved only for SELECT statements, UPDATE/INSERT will be solved on separate occasion.
Core changes are in, we need to start working on driver side.
To Be Done:
SCYLLA_USE_METADATA_IDprotocol extension from SUPPORTED frame;METADATA_CHANGED(=3) flag in result metadata;Resolve skip metadata flag
Default value of skip metadata flag should be treated as
safest optionWhich means that if
SCYLLA_USE_METADATA_IDwas negotiated or CQL v5 is used then it is true, result metadata is skipped.In other cases it is false.
Fixes
native-protocolto support optional protocol options (PR#2) inFrameCodec,Codec's andSubCodec's.SCYLLA_USE_METADATA_IDextension during protocol initializationOptionsstep.FrameEncoderandFrameDecoderwith updatedProtocolFeaturesinpipelineafter feature is negotiated.Frameencoding and decoding onnative-protocolside