Petr Gusev
d5b4b02b28
abstract_replication_strategy: calculate_natural_endpoints: make it work with both versions of token_metadata
...
We've updated all the places where token_metadata
is mutated, and now we can progress to the next stage
of the refactoring - gradually switching the read
code paths.
The calculate_natural_endpoints function
is at the core of all of them. It decides to what nodes
the given token should be replicated to for the given
token_metadata. It has a lot of usages in various contexts,
we can't switch them all in one commit, so instead we
allowed the function to behave in both ways. If
use_host_id parameter is false, the function uses the provided
token_metadata as is and returns endpoint_set as a result.
If it's true, it uses get_new() on the provided token_metadata
and returns host_id_set as a result.
The scope of the whole refactoring is limited to the erm data
structure, its interface will be kept inet_address based for now.
This means we'll often need to resolve host_ids to inet_address-es
as soon as we got a result from calculated_natural_endpoints.
A new calculate_natural_ips function is added for convenience.
It uses the new token_metadata and immediately resolves
returned host_id-s to inet_address-es.
The auxiliary declarations natural_ep_type, set_type, vector_type,
get_self_id, select_tm are introduced only for the sake of
migration, they will be removed later.
2023-12-12 23:19:53 +04:00
..
2023-03-07 17:54:53 +08:00
2023-05-02 11:04:05 +03:00
2023-04-07 20:32:28 +08:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-03-22 13:48:50 +02:00
2023-02-01 20:14:51 -03:00
2023-09-01 22:34:41 +02:00
2023-05-04 02:37:29 +02:00
2023-09-01 22:34:41 +02:00
2023-02-15 11:01:50 +02:00
2023-02-14 11:19:03 +02:00
2023-07-27 12:01:09 +03:00
2023-09-18 23:17:01 +03:00
2023-08-12 11:46:36 +03:00
2023-02-15 11:01:50 +02:00
2023-07-18 10:27:18 +08:00
2023-02-19 12:58:22 +08:00
2023-02-01 20:14:51 -03:00
2023-12-09 22:14:47 +02:00
2023-07-28 15:55:13 +03:00
2023-12-07 07:36:27 +00:00
2023-02-15 11:01:50 +02:00
2023-12-02 22:37:22 +02:00
2023-07-10 19:36:06 +02:00
2023-05-24 22:58:43 +02:00
2023-05-23 08:52:56 +03:00
2023-06-26 11:29:36 +03:00
2023-02-15 11:01:50 +02:00
2023-12-02 22:37:22 +02:00
2023-02-15 11:01:50 +02:00
2023-12-02 22:37:22 +02:00
2022-11-16 16:30:38 +02:00
2023-04-17 14:08:37 +03:00
2023-10-05 10:27:53 +03:00
2023-12-02 22:37:22 +02:00
2023-12-02 22:37:22 +02:00
2023-12-02 22:37:22 +02:00
2023-02-15 11:09:04 +02:00
2023-07-13 10:10:52 +02:00
2023-02-01 20:14:51 -03:00
2023-12-02 22:37:22 +02:00
2023-07-19 19:32:10 +03:00
2023-12-02 22:37:22 +02:00
2023-06-06 13:29:16 +03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-12-05 08:42:49 +02:00
2023-12-05 13:26:46 +02:00
2023-07-13 10:33:52 +03:00
2023-02-01 20:14:51 -03:00
2023-04-24 14:06:43 +03:00
2023-11-23 11:22:31 +02:00
2023-06-28 16:11:58 +02:00
2023-02-01 20:14:51 -03:00
2023-11-27 10:03:04 +02:00
2023-02-19 21:05:45 +02:00
2023-02-19 21:05:45 +02:00
2023-02-01 20:14:51 -03:00
2023-05-23 10:40:55 +03:00
2023-12-02 22:37:22 +02:00
2023-12-11 12:51:33 +04:00
2023-02-01 20:14:51 -03:00
2023-12-02 22:37:22 +02:00
2023-02-01 20:14:51 -03:00
2023-04-17 14:08:37 +03:00
2023-12-02 22:37:22 +02:00
2023-06-06 13:29:16 +03:00
2023-10-23 08:07:14 -04:00
2023-06-06 13:29:16 +03:00
2023-11-08 14:54:48 +01:00
2023-12-02 22:37:22 +02:00
2023-12-02 22:37:22 +02:00
2023-07-25 21:08:51 +02:00
2023-05-04 03:35:15 +02:00
2023-12-12 23:19:53 +04:00
2023-02-15 11:01:50 +02:00
2023-07-18 10:27:18 +08:00
2023-06-21 00:58:24 +02:00
2023-07-17 14:02:13 +08:00
2023-10-05 10:27:53 +03:00
2023-07-19 19:32:10 +03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-14 11:19:03 +02:00
2023-04-26 09:00:25 +03:00
2023-02-28 21:56:53 +08:00
2023-08-12 11:46:32 +03:00
2023-07-18 16:57:11 +03:00
2023-11-02 19:28:35 +03:00
2023-06-07 12:12:19 +03:00
2023-02-28 21:56:53 +08:00
2023-04-26 22:09:17 +02:00
2023-02-01 20:14:51 -03:00
2023-11-02 19:28:35 +03:00
2023-11-29 12:09:52 +03:00
2023-11-21 16:47:50 +03:00
2023-06-26 11:24:07 +03:00
2023-05-23 08:52:56 +03:00
2023-10-11 00:32:05 +03:00
2023-12-02 22:37:22 +02:00
2023-12-05 15:18:11 +02:00
2023-05-11 16:31:23 +03:00
2023-04-27 10:24:46 +03:00
2023-12-05 14:09:34 +01:00
2023-04-27 10:24:46 +03:00
2023-12-05 08:42:49 +02:00
2023-12-02 22:37:22 +02:00
2023-12-03 17:29:34 +02:00
2023-11-02 19:30:54 +03:00
2023-11-07 09:29:30 +02:00
2023-12-01 18:20:20 +03:00
2023-12-05 08:25:04 +03:00
2023-08-14 15:40:44 +03:00
2023-12-02 22:37:22 +02:00
2023-09-01 22:34:41 +02:00
2023-10-23 21:05:13 +03:00
2023-10-04 18:50:23 +02:00
2023-10-19 09:09:38 +03:00
2023-11-02 19:27:59 +03:00
2023-04-23 21:34:02 +03:00
2023-07-12 13:10:33 +03:00
2023-12-02 22:37:22 +02:00
2023-05-29 23:03:24 +03:00
2023-09-01 22:34:41 +02:00
2023-12-07 16:29:02 +02:00
2023-05-15 10:19:39 +03:00
2023-12-11 12:51:33 +04:00
2023-04-17 14:08:37 +03:00
2023-02-15 11:09:04 +02:00
2023-10-03 10:46:47 +03:00
2023-02-01 20:14:51 -03:00
2023-12-02 22:37:22 +02:00
2023-10-12 17:04:43 +03:00
2023-11-14 11:23:05 +02:00
2023-04-26 14:09:58 +08:00
2023-11-02 19:28:35 +03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-05-17 15:38:03 +02:00
2023-03-06 13:17:21 +03:00
2023-11-02 19:28:35 +03:00
2023-02-01 20:14:51 -03:00
2023-06-06 08:36:09 +03:00
2023-06-06 08:36:09 +03:00