]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/crimson: fix racing in testing
authorKefu Chai <kchai@redhat.com>
Thu, 10 Sep 2020 03:41:27 +0000 (11:41 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 10 Sep 2020 03:53:43 +0000 (11:53 +0800)
commitfe0f662a936cf53ed8f57d86acf2fcab3cfd3260
treee7840e32a968ca2ffafb8b3f60eb4b7ce0831e28
parent457fe7202f97f393b5efd26e53eaa2aa4a1d162d
test/crimson: fix racing in testing

before this change, unittest_seastar_config set the specified option to
the shard id in parallel and expects that the values of the option are
consistent across all shards after setting the value on all shards. but
sharded::invoke_on_all() is executed in parallel, and so does
ConfigProxy::do_change(), so there are actually "n x n" continuations
racing each other. the order of the continuations storing the setting
cannot be determined. so we cannot expected that the last batch of
continuations hitting shareds store the same value.

in this change, only a single `conf.set_val()` call is performed with
a known value. and this value is checked with the values stored on all
shards.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/test_config.cc