diff options
author | Csaba Henk <csaba@redhat.com> | 2020-05-14 17:46:09 +0200 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-06-02 10:34:51 +0000 |
commit | 9541796664103e69cc436598ff9c17cfd4e3c093 (patch) | |
tree | 7ff8944464e499d3bdda42c6ea56fe141e615d00 | |
parent | 6ac77f85255c198fe08ed34b238a308d9428ac6d (diff) | |
download | glusterfs-9541796664103e69cc436598ff9c17cfd4e3c093.tar.gz glusterfs-9541796664103e69cc436598ff9c17cfd4e3c093.tar.xz glusterfs-9541796664103e69cc436598ff9c17cfd4e3c093.zip |
io-cache,quick-read: deprecate volume options with flawed semantics or naming
- performance.cache-size has a flawed semantics, as it's
dispatched on two independent translators, io-cache
and quick-read.
- performance.qr-cache-timeout has a confusing name, as
other options affecting quick-read have an unabbreviated
"quick-read-..." prefix in their names.
We keep these options with unchanged operation, but in the
help output we indicate their deprecation.
The following better alternatives are introduced:
- performance.io-cache-size to tune cache-size option of io-cache
- performance.quick-read-cache-size to tune cache-size option of
quick-read
- performance.quick-read-cache-timeout as a preferred synonym for
performance.qr-cache-timeout
Fixes: #952
Change-Id: Ibd04fb638de8cac450ba992ad8a415154f9f4281
Signed-off-by: Csaba Henk <csaba@redhat.com>
-rw-r--r-- | tests/basic/quick-read-with-upcall.t | 2 | ||||
-rw-r--r-- | tests/bugs/glusterd/brick-mux.t | 2 | ||||
-rw-r--r-- | tests/bugs/glusterd/validating-options-for-replicated-volume.t | 13 | ||||
-rw-r--r-- | tests/bugs/glusterfs-server/bug-873549.t | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 30 |
5 files changed, 39 insertions, 10 deletions
diff --git a/tests/basic/quick-read-with-upcall.t b/tests/basic/quick-read-with-upcall.t index a70277f22d..dfb751dfcd 100644 --- a/tests/basic/quick-read-with-upcall.t +++ b/tests/basic/quick-read-with-upcall.t @@ -43,7 +43,7 @@ sleep 1 EXPECT "$D1" cat $M1/test.txt TEST $CLI volume set $V0 features.cache-invalidation on -TEST $CLI volume set $V0 performance.qr-cache-timeout 15 +TEST $CLI volume set $V0 performance.quick-read-cache-timeout 15 TEST $CLI volume set $V0 performance.md-cache-timeout 15 TEST write_to "$M0/test1.txt" "$D0" diff --git a/tests/bugs/glusterd/brick-mux.t b/tests/bugs/glusterd/brick-mux.t index eeaa3ebfea..927940534c 100644 --- a/tests/bugs/glusterd/brick-mux.t +++ b/tests/bugs/glusterd/brick-mux.t @@ -39,7 +39,7 @@ TEST glusterd EXPECT_WITHIN $PROCESS_UP_TIMEOUT 4 online_brick_count EXPECT 1 count_brick_processes -TEST $CLI volume set $V1 performance.cache-size 32MB +TEST $CLI volume set $V1 performance.io-cache-size 32MB TEST $CLI volume stop $V1 TEST $CLI volume start $V1 diff --git a/tests/bugs/glusterd/validating-options-for-replicated-volume.t b/tests/bugs/glusterd/validating-options-for-replicated-volume.t index ee231338ff..ddc80b1787 100644 --- a/tests/bugs/glusterd/validating-options-for-replicated-volume.t +++ b/tests/bugs/glusterd/validating-options-for-replicated-volume.t @@ -61,10 +61,15 @@ TEST ! $CLI volume set $V0 background-self-heal-count " " TEST $CLI volume set $V0 background-self-heal-count 10 EXPECT "10" volume_option $V0 cluster.background-self-heal-count -TEST ! $CLI volume set $V0 cache-size "" -TEST ! $CLI volume set $V0 cache-size " " -TEST $CLI volume set $V0 cache-size 512MB -EXPECT "512MB" volume_option $V0 performance.cache-size +TEST ! $CLI volume set $V0 io-cache-size "" +TEST ! $CLI volume set $V0 io-cache-size " " +TEST $CLI volume set $V0 io-cache-size 64MB +EXPECT "64MB" volume_option $V0 performance.io-cache-size + +TEST ! $CLI volume set $V0 quick-read-cache-size "" +TEST ! $CLI volume set $V0 quick-read-cache-size " " +TEST $CLI volume set $V0 quick-read-cache-size 512MB +EXPECT "512MB" volume_option $V0 performance.quick-read-cache-size TEST ! $CLI volume set $V0 self-heal-daemon "" TEST ! $CLI volume set $V0 self-heal-daemon " " diff --git a/tests/bugs/glusterfs-server/bug-873549.t b/tests/bugs/glusterfs-server/bug-873549.t index a3b2f9c9bf..8b5534728f 100644 --- a/tests/bugs/glusterfs-server/bug-873549.t +++ b/tests/bugs/glusterfs-server/bug-873549.t @@ -10,7 +10,7 @@ TEST $CLI volume info; TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2}; -TEST $CLI volume set $V0 performance.cache-size 512MB +TEST $CLI volume set $V0 performance.quick-read-cache-size 512MB TEST $CLI volume start $V0 TEST $CLI volume statedump $V0 all diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 71e4b2f7b4..2fa907ccff 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1266,10 +1266,21 @@ struct volopt_map_entry glusterd_volopt_map[] = { .option = "priority", .op_version = 1, .flags = VOLOPT_FLAG_CLIENT_OPT}, - {.key = "performance.cache-size", + {.key = "performance.io-cache-size", .voltype = "performance/io-cache", - .op_version = 1, + .option = "cache-size", + .op_version = GD_OP_VERSION_8_0, .flags = VOLOPT_FLAG_CLIENT_OPT}, + { + .key = "performance.cache-size", + .voltype = "performance/io-cache", + .op_version = 1, + .flags = VOLOPT_FLAG_CLIENT_OPT, + .description = "Deprecated option. Use performance.io-cache-size " + "to adjust the cache size of the io-cache translator, " + "and use performance.quick-read-cache-size to adjust " + "the cache size of the quick-read translator.", + }, /* IO-threads xlator options */ {.key = "performance.io-thread-count", @@ -1309,16 +1320,29 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "performance/io-cache", .option = "pass-through", .op_version = GD_OP_VERSION_4_1_0}, + {.key = "performance.quick-read-cache-size", + .voltype = "performance/quick-read", + .option = "cache-size", + .op_version = GD_OP_VERSION_8_0, + .flags = VOLOPT_FLAG_CLIENT_OPT}, {.key = "performance.cache-size", .voltype = "performance/quick-read", .type = NO_DOC, .op_version = 1, .flags = VOLOPT_FLAG_CLIENT_OPT}, + {.key = "performance.quick-read-cache-timeout", + .voltype = "performance/quick-read", + .option = "cache-timeout", + .op_version = GD_OP_VERSION_8_0, + .flags = VOLOPT_FLAG_CLIENT_OPT}, {.key = "performance.qr-cache-timeout", .voltype = "performance/quick-read", .option = "cache-timeout", .op_version = 1, - .flags = VOLOPT_FLAG_CLIENT_OPT}, + .flags = VOLOPT_FLAG_CLIENT_OPT, + .description = + "Deprecated option. Use performance.quick-read-cache-timeout " + "instead."}, {.key = "performance.quick-read-cache-invalidation", .voltype = "performance/quick-read", .option = "quick-read-cache-invalidation", |