-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Labels
area/statement-executionbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Milestone
Description
PreparedStatement::set_partitioner_name is given a string with parittioner name and sets the partitioner to the right one based on this name.
Every name other than CDCPartitioner is interpreted as Murmur3Partitioner.
This is dangerous, what if someone tries using a thrid partitioner or types CDCpartitoner instead of CDCpartitioner. We will silently ignore the fact that this is an unrecogized partitioner and use Murmur3.
Maybe this function should return error when partitioner name is unknown.
scylla-rust-driver/scylla/src/statement/prepared_statement.rs
Lines 264 to 272 in 5a56e85
| /// Sets the name of the partitioner used for this statement. | |
| pub(crate) fn set_partitioner_name(&mut self, partitioner_name: Option<&str>) { | |
| self.partitioner_name = match partitioner_name { | |
| Some(partitioner_name) if partitioner_name.ends_with("CDCPartitioner") => { | |
| PartitionerName::CDC | |
| } | |
| _ => PartitionerName::Murmur3, | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
area/statement-executionbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers