diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2017-01-25 15:31:44 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-27 10:34:08 -0500 |
commit | 27ac070dc9612cfcd591464dbaa40ed52b84e23f (patch) | |
tree | f2aedc45dd2e85d18670b0953495d828dcad975b /xlators/cluster/ec/src/ec-helpers.c | |
parent | dc7a7d694909bbb2808a198f1b1e19fe12f78fc1 (diff) |
cluster/ec: Don't trigger data/metadata heal on Lookups
Problem-1
If Lookup which doesn't take any locks observes version mismatch it can't be
trusted. If we launch a heal based on this information it will lead to
self-heals which will affect I/O performance in the cases where Lookup is
wrong. Considering self-heal-daemon and operations on the inode from client
which take locks can still trigger heal we can choose to not attempt a heal on
Lookup.
Problem-2:
Fixed spurious failure of
tests/bitrot/bug-1373520.t
For the issues above, what was happening was that ec_heal_inspect()
is preventing 'name' heal to happen
Problem-3:
tests/basic/ec/ec-background-heals.t
To be honest I don't know what the problem was, while fixing
the 2 problems above, I made some changes to ec_heal_inspect() and
ec_need_heal() after which when I tried to recreate the spurious
failure it just didn't happen even after a long time.
>BUG: 1414287
>Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
>Change-Id: Ife2535e1d0b267712973673f6d474e288f3c6834
>Reviewed-on: https://review.gluster.org/16468
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Ashish Pandey <aspandey@redhat.com>
BUG: 1419824
Change-Id: I340b48cd416b07890bf3a5427562f5e3f88a481f
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/16765
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/ec/src/ec-helpers.c')
-rw-r--r-- | xlators/cluster/ec/src/ec-helpers.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/xlators/cluster/ec/src/ec-helpers.c b/xlators/cluster/ec/src/ec-helpers.c index 195bb6377fa..751d45a63f6 100644 --- a/xlators/cluster/ec/src/ec-helpers.c +++ b/xlators/cluster/ec/src/ec-helpers.c @@ -211,8 +211,8 @@ int32_t ec_dict_set_array(dict_t *dict, char *key, uint64_t value[], } -int32_t ec_dict_del_array(dict_t *dict, char *key, uint64_t value[], - int32_t size) +int32_t +ec_dict_get_array (dict_t *dict, char *key, uint64_t value[], int32_t size) { void *ptr; int32_t len; @@ -246,11 +246,21 @@ int32_t ec_dict_del_array(dict_t *dict, char *key, uint64_t value[], } } - dict_del(dict, key); - return 0; } +int32_t +ec_dict_del_array (dict_t *dict, char *key, uint64_t value[], int32_t size) +{ + int ret = 0; + + ret = ec_dict_get_array (dict, key, value, size); + if (ret == 0) + dict_del(dict, key); + + return ret; +} + int32_t ec_dict_set_number(dict_t * dict, char * key, uint64_t value) { |