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 dd79bf2
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 @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
* `crud.readview` resource cleanup on garbage collect (#379).
* `doc/playground.lua` does not work with Tarantool 3 (#371).

## [1.3.0] - 27-09-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 dd79bf2

Please sign in to comment.