Bug #21843
closedmds: preserve order of requests during recovery of multimds cluster
0%
Description
there are several cases that requests get processed in wrong order
1)
touch a/b/f (handled by mds.1, early reply)
mkdir a/.snap/s1 (handle mds.0)
we should delay taking xlock on snaplock
if mds.1 restarts, the replaying the create request may happen after the mksnap request
2)
rm -f a/b/f (handled by mds.1, early reply)
lookup a/b/f (handled by mds.0, lookup is handled by non-auth mds)
we should delay taking rdlock on replica object
if mds.1 restarts, mds.0 may handle the lookup before mds.1 replays the unlink request
3)
rm -f a/b/f (handled by mds.1 early reply)
rmdir a/b (handled by mds.0)
dirfrag a/b/ is subtree. if mds.1 restart, mds.0 may check if a/b is empty before mds.1 replay the unlink request
we should delay take rdlock on scatterlock