On start the manager creates observer for object_storage_endpoints config parameter. The goal is to refresh the maintained set of endpoint parameters and client upon config change. The observer is created on shard 0 only, and when kicked it calls manager.invoke-on-all to update manager on all shards. However, there's a race here. The thing is that db::config values are implicitly "sharded" under the hood with the help of plain array. When any code tries to read a value from db::config::something, the reading code secretly gets the value from this inner array indexed by the current shard id. Next, when the config is updated, it first assigns new values to [0] element of the hidden array, then calls broadcast_to_all_shards() helper that copies the valaues from zeroth slot to all the others. But the manager's observer is triggered when the new value is assigned on zero index, and if the invoke-on-all lambda (mentioned above) happens to be faster than broadcast_to_all_shards, the non-zero shards will read old values from db::config's inner array. The fix is to instantiate observer on all shards and update only local shard, whenever this update is triggered. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.