Commit ade35d8
committed
fix: gate skip_meta and result_metadata_id on connection features at send-time
Using result_metadata_id != None as a proxy for whether SCYLLA_USE_METADATA_ID
was negotiated is unreliable in mixed-version clusters: a statement prepared
against a Scylla node (which sets result_metadata_id) could then be executed
against a node that doesn't support the extension, shifting the EXECUTE wire
layout and causing protocol errors.
Move the skip_meta and result_metadata_id decisions into _query(), where the
borrowed connection is known. Both are now gated on the connection's actual
negotiated features (connection.features.use_metadata_id for the Scylla
extension, ProtocolVersion.uses_prepared_metadata() for CQL v5+), ensuring
the correct wire format is used for each specific connection.1 parent 80b0c10 commit ade35d8
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2998 | 2998 | | |
2999 | 2999 | | |
3000 | 3000 | | |
3001 | | - | |
3002 | | - | |
3003 | | - | |
3004 | | - | |
| 3001 | + | |
3005 | 3002 | | |
3006 | 3003 | | |
3007 | 3004 | | |
| |||
4619 | 4616 | | |
4620 | 4617 | | |
4621 | 4618 | | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
4622 | 4625 | | |
4623 | 4626 | | |
4624 | 4627 | | |
| |||
0 commit comments