scylladb / scylladb

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

Alternator's handling of max_concurrent_requests_per_shard is different from CQL (and confusing) #19559

Open nyh opened 2 months ago

nyh commented 2 months ago

A user complained that max_concurrent_requests_per_shard parameter doesn't work on Alternator. When we tested it, we noticed that it does work - that's easiest to see when setting it to 0 and seeing all requests are rejected - but @nuivall discovered that:

I think I figured the difference between CQL and alternator shedding. In CQL we pass around deferred_action object until we finish writing response (including flush). While in alternator we decrease the counter before we even start sending the response. So to make it more correct (and also trigger faster) we need need to bring it closer to CQL implementation.

mykaul commented 2 months ago

Assuming medium priority for this right now.