From b14ec5104f60c0f3baa744835c1214fec6099e7b Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Tue, 27 May 2014 07:30:42 +0000 Subject: features/index: Don't delete current xattrop index. Problem: `gluster v heal 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 Reviewed-on: http://review.gluster.org/7897 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Niels de Vos --- xlators/features/index/src/index.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/features/index/src/index.c') 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)); -- cgit