diff --git a/doc/sphinx/reference/index.rst b/doc/sphinx/reference/index.rst index e35d0cacec447808609fb6a0774552d98946d5d9..602b48125c4abb3ecc7d1df1ecb51ae29dc0f6b9 100644 --- a/doc/sphinx/reference/index.rst +++ b/doc/sphinx/reference/index.rst @@ -23,3 +23,4 @@ pickle other expirationd + shard diff --git a/doc/sphinx/reference/shard.rst b/doc/sphinx/reference/shard.rst new file mode 100644 index 0000000000000000000000000000000000000000..aa003ae0d6d956fbe8d91b92a53b43deb9a48f07 --- /dev/null +++ b/doc/sphinx/reference/shard.rst @@ -0,0 +1,23 @@ +------------------------------------------------------------------------------- + Package `shard` +------------------------------------------------------------------------------- + +.. module:: shard + +With `sharding`_, +the tuples of a tuple set are distributed +to multiple nodes, with a Tarantool database server on each node. With this arrangement, +each server is handling only a subset of the total data, so larger loads can be +handled by simply adding more computers to a network. + +The Tarantool shard package has facilities +for creating or redistributing or cleaning up shards, as well as analogues for the +data-manipulation functions of the box library (select, insert, replace, update, delete). + +Some details are `On the shard section of github`_. + + +.. _sharding: https://en.wikipedia.org/wiki/Sharding +.. _On the shard section of github: https://github.com/tarantool/shard + + diff --git a/src/box/xlog.cc b/src/box/xlog.cc index f89fe88654b189da0be48182f425882e79960eb0..a381ae38df53595a0e9dacb22f8dea2f7884275f 100644 --- a/src/box/xlog.cc +++ b/src/box/xlog.cc @@ -658,8 +658,6 @@ xlog_atfork(struct xlog **lptr) * fclose(). */ close(fileno(l->f)); - fclose(l->f); - free(l); *lptr = NULL; } } diff --git a/test/app/snapshot.test.lua b/test/app/snapshot.test.lua index c98cbf9a16b381852d202c34039bb2e8359bb3c0..a2d78590a083244187636bb4f0e8ad7c00fe6580 100755 --- a/test/app/snapshot.test.lua +++ b/test/app/snapshot.test.lua @@ -5,9 +5,11 @@ fiber = require('fiber') -- -- Check that Tarantool creates ADMIN session for #! script -- +continue_snapshoting = true + function noise() fiber.name('noise-'..fiber.id()) - while true do + while continue_snapshoting do if box.space.test:len() < 300000 then local value = string.rep('a', math.random(255)+1) box.space.test:auto_increment{fiber.time64(), value} @@ -18,7 +20,7 @@ end function purge() fiber.name('purge-'..fiber.id()) - while true do + while continue_snapshoting do local min = box.space.test.index.primary:min() if min ~= nil then box.space.test:delete{min[1]} @@ -27,18 +29,13 @@ function purge() end end -continue_snapshoting = true - function snapshot(lsn) fiber.name('snapshot') - while true do + while continue_snapshoting do local new_lsn = box.info.server.lsn if new_lsn ~= lsn then lsn = new_lsn; - box.snapshot() - end - if not continue_snapshoting then - break + pcall(box.snapshot) end fiber.sleep(0.001) end