blob: fccd623a2b368b10ef07ec1bb50ff7dd48b0601c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// test the lock/unlock snapshotting feature a bit
x=db.runCommand({fsync:1,lock:1});
assert(!x.ok,"D");
d=db.getSisterDB("admin");
x=d.runCommand({fsync:1,lock:1});
assert(x.ok,"C");
y = d.currentOp();
assert(y.fsyncLock,"B");
z = d.$cmd.sys.unlock.findOne();
// it will take some time to unlock, and unlock does not block and wait for that
// doing a write will make us wait until db is writeable.
db.jstests_fsync.insert({x:1});
assert( d.currentOp().fsyncLock == null, "A" );
|