summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2019-04-09 19:02:53 +0530
committerRaghavendra G <rgowdapp@redhat.com>2019-07-08 05:10:03 +0000
commit4c44c47a40910c70e7d22d2bc6b7c21b88e3296b (patch)
tree56dae3b0d69340ac7649dbe8e5dbd208f386ffd6 /xlators
parent99d210a704d2e85c95fac5edcf435bd059aad368 (diff)
quick-read: rename cache-invalidation key to avoid redundant keys
With group-metadata-cache group profile settings performance.cache-invalidation option when turned on enables both md-cache and quick-read xlator's cache-invalidation feature. While the intent of the group-metadata-cache is to set md-cache xlator's cache-invalidation feature, quick-read xlator also gets affected due to the same. While md-cache feature and it's profile existed since release-3.9, quick-read cache-invalidation was introduced in release-4 and due to this op-version mismatch on any cluster which is >= glusterfs-4 when this group profile is applied it breaks backward compatibility with the old clients. The proposed fix here is to rename the key in quick-read to 'quick-read-cache-invalidation' so that both these features have distinct identification. While this brings in by itself a backward compatibility challenge where this feature is enabled in an existing cluster and when the same is upgraded to a version where this change exists, it will lead to an unidentified old key. But as a workaround we can always ask users upgrading to release-7 version to turn off this option, upgrade the cluster and turn it back on with the new key. This needs to be documented once the patch is accepted. Fixes: bz#1698042 Change-Id: I30422ba6496208e21191a8d78ad29b2e21078664 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c4
-rw-r--r--xlators/performance/quick-read/src/quick-read.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index b943f66c008..4cadcd5dd19 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1251,9 +1251,9 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.option = "cache-timeout",
.op_version = 1,
.flags = VOLOPT_FLAG_CLIENT_OPT},
- {.key = "performance.cache-invalidation",
+ {.key = "performance.quick-read-cache-invalidation",
.voltype = "performance/quick-read",
- .option = "cache-invalidation",
+ .option = "quick-read-cache-invalidation",
.op_version = GD_OP_VERSION_4_0_0,
.flags = VOLOPT_FLAG_CLIENT_OPT},
{.key = "performance.ctime-invalidation",
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 244e8c8d44e..4f16d148262 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -1218,8 +1218,8 @@ qr_reconfigure(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("cache-timeout", conf->cache_timeout, options, int32, out);
- GF_OPTION_RECONF("cache-invalidation", conf->qr_invalidation, options, bool,
- out);
+ GF_OPTION_RECONF("quick-read-cache-invalidation", conf->qr_invalidation,
+ options, bool, out);
GF_OPTION_RECONF("ctime-invalidation", conf->ctime_invalidation, options,
bool, out);
@@ -1369,7 +1369,8 @@ qr_init(xlator_t *this)
GF_OPTION_INIT("cache-timeout", conf->cache_timeout, int32, out);
- GF_OPTION_INIT("cache-invalidation", conf->qr_invalidation, bool, out);
+ GF_OPTION_INIT("quick-read-cache-invalidation", conf->qr_invalidation, bool,
+ out);
GF_OPTION_INIT("cache-size", conf->cache_size, size_uint64, out);
if (!check_cache_size_ok(this, conf->cache_size)) {
@@ -1615,7 +1616,7 @@ struct volume_options qr_options[] = {
.flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
},
{
- .key = {"cache-invalidation"},
+ .key = {"quick-read-cache-invalidation"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "false",
.op_version = {GD_OP_VERSION_4_0_0},