diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2018-12-28 18:53:15 +0530 |
---|---|---|
committer | Krutika Dhananjay <kdhananj@redhat.com> | 2019-01-15 04:57:11 +0000 |
commit | 11186f4e0b1d5952318060d6e8d3610d4d94add8 (patch) | |
tree | 8838b319874976c7102da0aa326bd221a383dcbd /configure.ac | |
parent | 4bbb0ecfac59f2ae8816640c516bb20b0b06aa44 (diff) |
features/shard: Fix launch of multiple synctasks for background deletion
PROBLEM:
When multiple sharded files are deleted in quick succession, multiple
issues were observed:
1. misleading logs corresponding to a sharded file where while one log
message said the shards corresponding to the file were deleted
successfully, this was followed by multiple logs suggesting the very
same operation failed. This was because of multiple synctasks
attempting to clean up shards of the same file and only one of them
succeeding (the one that gets ENTRYLK successfully), and the rest of
them logging failure.
2. multiple synctasks to do background deletion would be launched, one
for each deleted file but all of them could readdir entries from
.remove_me at the same time could potentially contend for ENTRYLK on
.shard for each of the entry names. This is undesirable and wasteful.
FIX:
Background deletion will now follow a state machine. In the event that
there are multiple attempts to launch synctask for background deletion,
one for each file deleted, only the first task is launched. And if while
this task is doing the cleanup, more attempts are made to delete other
files, the state of the synctask is adjusted so that it restarts the
crawl even after reaching end-of-directory to pick up any files it may
have missed in the previous iteration.
This patch also fixes uninitialized lk-owner during syncop_entrylk()
which was leading to multiple background deletion synctasks entering
the critical section at the same time and leading to illegal memory access
of base inode in the second syntcask after it was destroyed post shard deletion
by the first synctask.
Change-Id: Ib33773d27fb4be463c7a8a5a6a4b63689705324e
updates: bz#1665803
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
(cherry picked from commit c0c2022e7d7097e96270a74f37813eda0c4e6339)
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions