Skip to content

Commit fe2d02f

Browse files
committed
replace "sharding key" to "bucket_id" in error message
Initially we expect that first field of "bucket_id" index is empty as user shouldn't affect internal processes in our system. So we return an error in case then this field in tuple is not empty. But some logic error in error message was done. When we say "sharing key" we mean a part of tuple (currently primary key for bucket_id calculation). May be "shard key" is more vshard-agnostic varian. So to avoid over complication let's use "bucket_id" as in vshard.
1 parent 323621b commit fe2d02f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crud/insert.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function insert.tuple(space_name, tuple, opts)
7373
end
7474

7575
if tuple[bucket_id_fieldno] ~= nil then
76-
return nil, InsertError:new("Unexpected value (%s) at field %s (sharding key)",
76+
return nil, InsertError:new("Unexpected value (%s) at field %s (bucket_id)",
7777
tuple[bucket_id_fieldno], bucket_id_fieldno)
7878
end
7979

crud/replace.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function replace.tuple(space_name, tuple, opts)
7373
end
7474

7575
if tuple[bucket_id_fieldno] ~= nil then
76-
return nil, ReplaceError:new("Unexpected value (%s) at field %s (sharding key)",
76+
return nil, ReplaceError:new("Unexpected value (%s) at field %s (bucket_id)",
7777
tuple[bucket_id_fieldno], bucket_id_fieldno)
7878
end
7979

crud/upsert.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function upsert.tuple(space_name, tuple, user_operations, opts)
8383
end
8484

8585
if tuple[bucket_id_fieldno] ~= nil then
86-
return nil, UpsertError:new("Unexpected value (%s) at field %s (sharding key)",
86+
return nil, UpsertError:new("Unexpected value (%s) at field %s (bucket_id)",
8787
tuple[bucket_id_fieldno], bucket_id_fieldno)
8888
end
8989

0 commit comments

Comments
 (0)