mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
The single-node test Scylla run by test/alternator/run uses, as the default, 256 vnodes. When we have 256 vnodes and two shards, our CDC implementation produces 512 separate "streams" (called "shards" in DynamoDB lingo). This causes each of the tests in test_streams.py which need to read data from the stream to need to do 1024 (!) API requests (512 calls to GetShardIterator and 512 calls to GetRecords) which takes significant time - about a second per test. In this patch, we reduce the number of vnodes to 16. We still have a non-negligible number of stream "shards" (32) so this part of the CDC code is still exercised. Moreover, to ensure we still routinely test the paging feature of DescribeStream (whose default page size is 100), the patch changes the request to use a Limit of 10, so paging will still be used to retrieve the list of 32 shards. The time to run the 27 tests in test_streams.py, on my laptop: Before this patch: 26 seconds After this patch: 6 seconds. Fixes #6979 Message-Id: <20200805093418.1490305-1-nyh@scylladb.com>