scylladb / scylladb

NoSQL data store using the seastar framework, compatible with Apache Cassandra
http://scylladb.com
GNU Affero General Public License v3.0
13.6k stars 1.3k forks source link

tablet tests wait for ring_delay #17191

Open avikivity opened 9 months ago

avikivity commented 9 months ago
1780472 /home/avi/scylla-maint/build/debug/scylla --smp 2 -m 1G --collectd 0 --overprovisioned --max-networking-io-control-blocks 1000 --unsafe-bypass-fsync 1 --kernel-page-cache 1 --commitlog-use-o-dsync 0 --abort-on-lsa-bad-alloc 1 --abort-on-seastar-bad-alloc --abort-on-internal-error 1 --abort-on-ebadf 1 --logger-log-level storage_proxy=trace --logger-log-level cql_server=trace --logger-log-level query_processor=trace --logger-log-level gossip=trace --logger-log-level storage_service=trace --logger-log-level raft_topology=trace --logger-log-level messaging_service=trace --logger-log-level rpc=trace

AFAICT we don't drop ring_delay and consistent topology doesn't do that automatically.

tgrabiec commented 9 months ago

Which tests are these?

@kbr-scylla Why doesn't consistent topology drop ring delay by default?

kbr-scylla commented 9 months ago

Ring delay is used in topology coordinator code.

                auto cdc_gen_ts = cdc::new_generation_timestamp(add_ts_delay, _ring_delay);

and

                if (barrier_failed) {
                    // If barrier above failed it means there may be unfenced reads from old replicas.
                    // Lets wait for the ring delay for those writes to complete or fence to propagate
                    // before continuing.
                    // FIXME: nodes that cannot be reached need to be isolated either automatically or
                    // by an administrator
                    co_await sleep_abortable(_ring_delay, _as);
                    node = retake_node(co_await start_operation(), node.id);
                }

and

                if (barrier_failed) {
                    // If barrier above failed it means there may be unfinished writes to a decommissioned node.
                    // Lets wait for the ring delay for those writes to complete and new topology to propagate
                    // before continuing.
                    co_await sleep_abortable(_ring_delay, _as);
                    node = retake_node(co_await start_operation(), node.id);
                }
avikivity commented 9 months ago

Maybe we want separate delays for cdc, failed barriers, and normal serving. The first two don't impact normal operation, the last does.