python-driver icon indicating copy to clipboard operation
python-driver copied to clipboard

Implement CDCPartitioner

Open dkropachev opened this issue 1 year ago • 2 comments

Add new class CDCToken which implements a Scylla CDC partitioner, as defined here:

https://github.com/scylladb/scylla/blob/master/cdc/cdc_partitioner.cc

Modify Metadata to use CDC partitioner instead of cluster-wide partitioner when calculating token for CDC log table. As Scylla token range information is shared between Murmur3 partitioner and CDC partitioner only a single TokenMap is used.

(In case of Scylla) this TokenMap stores M3PToken tokens, but queries for CDCToken are allowed - M3PToken and CDCToken are modified to allow comparison between those types (as they are both represented by 64-bit integers).

Analogue PR to java driver: https://github.com/scylladb/java-driver/pull/35

dkropachev avatar Jan 17 '25 17:01 dkropachev

Modify Statement classes to provide table name alongside already implemented keyspace name, in order to detect if CDC partitioner should be used for a given Statement.

Isn't this already done because of tablets?

Lorak-mmk avatar Jan 20 '25 12:01 Lorak-mmk

Modify Statement classes to provide table name alongside already implemented keyspace name, in order to detect if CDC partitioner should be used for a given Statement.

Isn't this already done because of tablets?

True, removed

dkropachev avatar Jan 20 '25 12:01 dkropachev