summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-05-27 07:30:42 +0000
committerNiels de Vos <ndevos@redhat.com>2014-06-24 02:27:55 -0700
commitb14ec5104f60c0f3baa744835c1214fec6099e7b (patch)
treead8f641d3c7e6a09e288a80253186269e8c718b1 /xlators/features
parent8cbe743dd972e934265e9a4186359be63c77d9f1 (diff)
features/index: Don't delete current xattrop index.
Problem: `gluster v heal <volname> statistics heal-count` was not able to read the number of entries to be healed from the source brick because the base xattrop entries in indices/base_indices_holder and indices/xattrop were getting deleted after a successful heal and the code flow prevented them from creating it again. Fix: Don't delete the xattrop index unless it is stale (i.e. brick is restarted) Change-Id: Ief4eee0ddf42c4d8b711d00751be92bbbc7bbbb0 BUG: 1101647 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7897 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/index/src/index.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 9fa32129eb5..7f3c085da7a 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -253,6 +253,10 @@ check_delete_stale_index_file (xlator_t *this, char *filename)
if (priv->to_be_healed_states != synced_state)
return;
+ /*Don't delete the index if is the current xattrop index*/
+ if (!strcmp (&filename[8], uuid_utoa (priv->index)))
+ return;
+
make_file_path (priv->index_basepath, XATTROP_SUBDIR,
filename, filepath, sizeof (filepath));