-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Background
The current replica resolution APIs exposed by Metadata:
public ICollection<HostShard> GetReplicas(string keyspaceName, byte[] partitionKey)
public ICollection<HostShard> GetReplicas(byte[] partitionKey)were inherited from the original DataStax driver API. These methods determine replicas without requiring a table name.
This design predates tablet-based replication used in modern ScyllaDB clusters.
Problem
Replica resolution in ScyllaDB can depend on tablet metadata, which is defined per table. Without the table name, the driver cannot correctly resolve replicas when tablets are used.
Because the current C# APIs do not accept a table name, the tablet-based path cannot be used. This effectively forces replica resolution to assume vnode-based replication, which is incorrect for tablet-enabled clusters.
Proposed Solution
Deprecate existing APIs
public ICollection<HostShard> GetReplicas(string keyspaceName, byte[] partitionKey)
public ICollection<HostShard> GetReplicas(byte[] partitionKey)These APIs cannot correctly support tablet-aware replica resolution.
Introduce new APIs requiring a table name
Example proposal:
public ICollection<HostShard> GetReplicas(string keyspaceName, string tableName, byte[] partitionKey)This allows the driver to:
-
Look up (keyspace, table) in tablet metadata
-
Correctly resolve replicas for tablet-based replication
-
Fall back to replication strategies when tablets are not present