Skip to content

Recalculate maxQueueSize based on shards count #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: scylla-3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ ListenableFuture<Connection> borrowConnection(

int shardId = 0;
if (host.getShardingInfo() != null) {
maxQueueSize = host.getShardingInfo().getShardsCount() * maxQueueSize;
if (routingKey != null) {
Metadata metadata = manager.cluster.getMetadata();
Token t = metadata.newToken(partitioner, routingKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ public PoolingOptions setPoolTimeoutMillis(int poolTimeoutMillis) {
}

/**
* Returns the maximum number of requests that get enqueued if no connection is available.
* Returns the maximum number of requests per shard that get enqueued if no connection is
* available.
*
* @return the maximum queue size.
*/
Expand Down
Loading