Skip to content

Conversation

@jul-stas
Copy link
Owner

@jul-stas jul-stas commented Jul 1, 2020

Design is based on shard-awareness in java driver.

@jul-stas jul-stas force-pushed the shard-awareness branch 3 times, most recently from 7d7c09a to 1f98865 Compare August 11, 2020 13:07
This required supplying std::optional from a 3rd party
implementation (by Andrzej Krzemienski). The selection of
`optional` is done on the basis of C++ standard version, e.g.:

cmake -DCASS_CPP_STANDARD=17 ..

will use std::optional, while `-DCASS_CPP_STANDARD=11` will fall
back to the 3rd party impl.
At this point metrics indicate that cross-shard ops are reduced,
but the implementation is still raw. The reasons:
When connection-to-the-right-shard is being searched among per-host
connections, it is done by linear search. Connecting logic does not
attempt to reconnect until all shards are hit. Topology change
events are not accounted for.
The reconnection is being scheduled until we reach the desired
number of connections per shard.

The other change is that instead of picking the 'least busy'
connection from the host's pool, we pick the least busy one from
the "shards pool".
jul-stas pushed a commit that referenced this pull request Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant