Skip to content

Commit

Permalink
doc: fix playground.lua for Tarantool 3
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oleg-jukovec committed Oct 5, 2023
1 parent 994d9dc commit 3b9532f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
* Crud DML operations returning stale schema for metadata generation.
Now you may use `fetch_latest_metadata` flag to work with latest schema (#236).
* `doc/playground.lua` does not work with Tarantool 3 (#366).

## [1.1.1] - 24-03-23

Expand Down
9 changes: 8 additions & 1 deletion doc/playground.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ else
fio.rmtree(tempdir)
end

local replicaset_uuid
if box.info().replicaset ~= nil then
replicaset_uuid = box.info().replicaset.uuid
else
replicaset_uuid = box.info().cluster.uuid
end

-- Setup vshard.
_G.vshard = vshard
box.once('guest', function()
Expand All @@ -43,7 +50,7 @@ local uri = 'guest@localhost:3301'
local cfg = {
bucket_count = 3000,
sharding = {
[box.info().cluster.uuid] = {
[replicaset_uuid] = {
replicas = {
[box.info().uuid] = {
uri = uri,
Expand Down

0 comments on commit 3b9532f

Please sign in to comment.