diff options
author | Csaba Henk <csaba@redhat.com> | 2016-10-27 07:30:48 +0200 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2017-01-11 07:40:25 -0800 |
commit | bb438d849a4a3941c1a9b525213f695f0a2c961b (patch) | |
tree | e17e44f95d734ac1dcdabb69b1d867afcd758604 /xlators/cluster/afr/src/afr-transaction.c | |
parent | d6bc8da62f1b0d454fa5187687fdbf894403c7ce (diff) |
feature/dht: undo partially successful dir rename
As with dht, dirs are present on all subvolumes,
renaming them is a compound operation and thus a
partial success + partial failure scenario is
possible, resulting in an inconsistent state.
For purposes of reproduction, such a scenario can
easily be produced by stopping the volume, edit the
volfile of a certain subvolume to get at an
"option read-only on" setting, and then restart
the volume. Thus those operations that are to make change
on the affected subvolume will fail with EROFS.
To handle such scenarios, we introduce an in-memory cache
where we record the return values obtained from the
subvolumes. At the final stage of the dir rename operation
we check if it's a partial success/fail situation. If yes,
then we perform a reverse rename op on those subvolumes
where the operation succeeded.
Change-Id: I3d05f74f53932cb984a918d252a7309c1009a51d
BUG: 1412069
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/15739
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
0 files changed, 0 insertions, 0 deletions