mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-04 14:03:06 +00:00
alternator: fix clustering key setup
Because of a typo, we incorrectly set the table's sort key as a second partition key column instead of a clustering key column. This has bad but subtle consequences - such as that the items are *not* sorted according to the sort key. So in this patch we fix the typo. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
@@ -277,7 +277,7 @@ future<json::json_return_type> executor::create_table(std::string content) {
|
||||
throw api_error("ValidationException",
|
||||
"Second key in KeySchema must be a RANGE key");
|
||||
}
|
||||
add_column(builder, key_schema[1]["AttributeName"].asString(), attribute_definitions, column_kind::partition_key);
|
||||
add_column(builder, key_schema[1]["AttributeName"].asString(), attribute_definitions, column_kind::clustering_key);
|
||||
}
|
||||
builder.with_column(bytes(ATTRS_COLUMN_NAME), attrs_type(), column_kind::regular_column);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user