Skip to content

Commit 5a714cf

Browse files
committed
doc: fix playground.lua for Tarantool 3
We need use `box.info.replication.uuid` instead of `box.info.cluster.uuid` to support Tarantool 3.0 [1]. 1. tarantool/tarantool#8289 Part of #366 Closes #371
1 parent 5345747 commit 5a714cf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717
### Fixed
1818
* Crud DML operations returning stale schema for metadata generation.
1919
Now you may use `fetch_latest_metadata` flag to work with latest schema (#236).
20+
* `doc/playground.lua` does not work with Tarantool 3 (#366).
2021

2122
## [1.1.1] - 24-03-23
2223

doc/playground.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ else
3434
fio.rmtree(tempdir)
3535
end
3636

37+
local replicaset_uuid
38+
if box.info().replicaset ~= nil then
39+
replicaset_uuid = box.info().replicaset.uuid
40+
else
41+
replicaset_uuid = box.info().cluster.uuid
42+
end
43+
3744
-- Setup vshard.
3845
_G.vshard = vshard
3946
box.once('guest', function()
@@ -43,7 +50,7 @@ local uri = 'guest@localhost:3301'
4350
local cfg = {
4451
bucket_count = 3000,
4552
sharding = {
46-
[box.info().cluster.uuid] = {
53+
[replicaset_uuid] = {
4754
replicas = {
4855
[box.info().uuid] = {
4956
uri = uri,

0 commit comments

Comments
 (0)