-
Notifications
You must be signed in to change notification settings - Fork 48
WIP #493
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
base: master
Are you sure you want to change the base?
WIP #493
Conversation
3bcd9c1
to
de02da7
Compare
TODO: |
f74ce7f
to
203c576
Compare
3a630b3
to
86db20c
Compare
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.
Pull Request Overview
This PR removes legacy support for protocol versions 1 and 2, standardizes on protocol v3+ handling throughout code, tests, and documentation, and simplifies collection serialization to always use 32-bit length prefixes.
- Drop all v1/v2-specific branches in protocol framing, query parameters, and metadata parsing.
- Update tests to assume protocol version 3 (or higher) as the baseline.
- Refactor collection types to always use
int32_pack
/int32_unpack
for lengths.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/unit/test_parameter_binding.py | Consolidated legacy BoundStatementTestV* into v3+ class |
tests/unit/test_orderedmap.py | Updated default protocol for OrderedMapSerializedKey |
tests/unit/test_marshalling.py | Switched marshalling/unmarshalling calls to proto v3+ |
tests/unit/test_host_connection_pool.py | Removed unused get_max_requests_per_connection override |
tests/unit/test_connection.py | Removed legacy header logic for protocol <3 |
tests/unit/io/utils.py | Adjusted header prefix to include MSB byte for v3+ |
tests/integration/.../test_cluster.py | Deleted outdated tests for v1/v2 settings and decorators |
tests/integration/init.py | Removed obsolete protocol decorators |
docs/api/cassandra/cluster.rst | Removed automethod listings for min/max request APIs |
cassandra/protocol.py | Eliminated protocol <2 error checks and branches |
cassandra/connection.py | Always use v3 header struct; drop v1/v2 variants |
cassandra/pool.py | Removed per-connection request thresholds for v1/v2 |
cassandra/metadata.py | Dropped keyspace update for legacy protocol versions |
cassandra/cqltypes.py | Always use 32-bit length prefixes; removed 16-bit paths |
cassandra/cluster.py | Deleted min/max requests methods and fields |
cassandra/init.py | Updated SUPPORTED_VERSIONS to drop v1 and v2 |
benchmarks/callback_full_pipeline.py | Removed conditional concurrency for protocols <3 |
Comments suppressed due to low confidence (1)
cassandra/pool.py:1016
- [nitpick] By removing the
in_flight
threshold check before spawning new connections, the pool may create connections too aggressively under load. Consider reintroducing a minimal in-flight requests threshold to prevent unnecessary connections.
if len(self._connections) < max_conns:
@@ -180,7 +170,7 @@ class ProtocolVersion(object): | |||
DSE private protocol v2, supported in DSE 6.0+ | |||
""" | |||
|
|||
SUPPORTED_VERSIONS = (DSE_V2, DSE_V1, V6, V5, V4, V3, V2, V1) | |||
SUPPORTED_VERSIONS = (DSE_V2, DSE_V1, V6, V5, V4, V3) |
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.
The SUPPORTED_VERSIONS
tuple no longer includes V2 and V1, but get_supported_protocol_versions
can still return versions 1 and 2. This mismatch may cause negotiation of unsupported protocols; please align both lists or enforce protocol >=3.
Copilot uses AI. Check for mistakes.
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.
OK, makes sense.
Remove most of the code related to V1, V2 protocol versions. Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
Remove additional getters and setters that only make sense for V1/V2 protocols. Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
86db20c
to
8acc3c0
Compare
Pre-review checklist
./docs/source/
.Fixes:
annotations to PR description.