commit - e99f6cb094fc978346eda9000d0b7e6e0b2a2fbb
commit + 2c422a0b98675cab480ebb44256dfeb72bd2f820
blob - 79652bd487ae771346bab11877a0b329f0573d8c
blob + facd3b1d558e38e58f18e3cff307c1a24a83059c
--- perf/lua/1mops_write.lua
+++ perf/lua/1mops_write.lua
local test_dir = fio.tempdir()
+local function rmtree(s)
+ if (fio.path.is_file(s) or fio.path.is_link(s)) then
+ fio.unlink(s)
+ return
+ end
+ if fio.path.is_dir(s) then
+ for _,i in pairs(fio.listdir(s)) do
+ rmtree(s..'/'..i)
+ end
+ fio.rmdir(s)
+ end
+end
+
local function exit(res, details)
if (details ~= nil) then
print(details)
end
if test_dir ~= nil then
- fio.rmdir(test_dir)
+ rmtree(test_dir)
test_dir = nil
end
os.exit(res)
exit(0)
end
--- turn true to test the qsync
-local test_qsync = params.qsync or false
+-- turn true to test the synchronous replication
+local test_sync = params.sync or false
-- number of operations performed by test
local num_ops = params.ops or 10000000
local done = false
local err
-if (test_qsync) then
+if (test_sync) then
box.cfg{replication_synchro_quorum = nodes}
print('# promoting')
box.ctl.promote()