Commit Graph

8 Commits

Author SHA1 Message Date
Petr Gusev
095f35a47d token_metadata_test: add a test for everywhere strategy 2023-05-21 13:17:42 +04:00
Petr Gusev
8877641b0f token_metadata_test: check read_endpoints when bootstrapping first node 2023-05-21 13:17:42 +04:00
Petr Gusev
e9a6fcc8e1 token_metadata_test: refactor tests, extract create_erm
No logical changes, just tidied up
2023-05-21 13:17:42 +04:00
Petr Gusev
87307781c4 effective_replication_map: use new get_pending_endpoints and get_endpoints_for_reading
We already use the new pending_endpoints from erm though
the get_pending_ranges virtual function, in this commit
we update all the remaining places to use the new
implementation in erm, as well as remove the old implementation
in token_metadata.
2023-05-21 13:17:42 +04:00
Petr Gusev
d4f004f5c7 token_metadata_test.cc: create token_metadata and replication_strategy as shared pointers
We want to switch token_metadata_test to the new
implementation of pending_endpoints and read_endpoints in erm.
To do this, it is convenient to have token_metadata and
replication_strategy as shared pointers, as it fits better with the signature
of calculate_effective_replication_map. In this commit we don't
change the logic of the tests, we just migrate them to use pointers.
2023-05-21 13:17:42 +04:00
Petr Gusev
51e80691ef token_metadata: replace set_topology_transition_state with set_read_new
This helps isolate topology::transition_state dependencies,
token_metadata doesn't need the entire enum, just  this
boolean flag.
2023-05-19 19:04:43 +04:00
Petr Gusev
15fe4d8d69 token_metadata: add unit test for endpoints_for_reading 2023-05-09 18:42:03 +04:00
Petr Gusev
3120cabf56 token_metadata: add unit tests
We are going to refactor update_pending_ranges,
so in this commit we add some simple unit tests
to ensure we don't break it.
2023-05-09 13:56:06 +04:00