PR #913 adds TABLETS_ROUTING_V2 decoding alongside the existing V1 decoding in ResponseFuture. The implementation is functional and can be merged as-is, but ResponseFuture now owns tablet wire-format descriptions, lazy decoder caches, payload decoding, and cache orchestration.
Move tablet-routing payload codec responsibilities to cassandra/tablets.py, which already owns Tablet, tablet-version handling, and the tablet cache.
Suggested scope:
- Move the V1 and V2 CQL tuple layouts out of
ResponseFuture.
- Define/cache both payload decoders together in
cassandra/tablets.py.
- Expose a helper that decodes a routing payload into a
Tablet.
- Keep
ResponseFuture responsible only for selecting the negotiated payload and storing the decoded tablet.
- Remove
_TABLET_ROUTING_CTYPE and _TABLET_ROUTING_V2_CTYPE from ResponseFuture.
- Preserve existing V1/V2 wire behavior and add focused codec tests.
Follow-up to #913; no changes to #913 are required before merging.
PR #913 adds TABLETS_ROUTING_V2 decoding alongside the existing V1 decoding in
ResponseFuture. The implementation is functional and can be merged as-is, butResponseFuturenow owns tablet wire-format descriptions, lazy decoder caches, payload decoding, and cache orchestration.Move tablet-routing payload codec responsibilities to
cassandra/tablets.py, which already ownsTablet, tablet-version handling, and the tablet cache.Suggested scope:
ResponseFuture.cassandra/tablets.py.Tablet.ResponseFutureresponsible only for selecting the negotiated payload and storing the decoded tablet._TABLET_ROUTING_CTYPEand_TABLET_ROUTING_V2_CTYPEfromResponseFuture.Follow-up to #913; no changes to #913 are required before merging.