Piotr Dulikowski
63a47117d7
service_level_controller: more permissive computation of effective SLs
...
In order to calculate an effective service level, parameters of all
roles reachable in the role grants graph need to be considered (or,
equivalently, the effective service levels of the direct children need
to be considered). The current logic performs a topological sort on the
role grants graph in order to compute effective service levels of all
roles efficiently. The role grants graph should, in theory, always be
acyclic - the GRANT statement refuses to proceed if it sees that it
would create a cycle.
However, in pre-group0 auth acyclicity is only best-effort because of
the lack of linearizability of auth statements. Moreover, data can
become out of shape due to other reasons such as lack of repair or
manual edits. Our current topological sort algorithm does not handle
these well.
Change the algorithm to a DFS with memoization. Unlike topological sort,
this algorithm gracefully handles algorithms with cycles - while the
computed effective service levels might not be entirely correct in such
case, the algorithm detects and reports those by logging a warning with
an example of a cycle.
In addition to the algorithm change, two test cases are added: one with
an example of a cyclic roles graph, and the other with an example of a
graph with edges leading to roles which do not exist. The new algorithm
handles both gracefully.
Fixes: SCYLLADB-2328
Closes scylladb/scylladb#30170
2026-06-03 17:04:12 +03:00
..
2026-06-03 17:04:12 +03:00
2026-06-01 18:30:55 +02:00
2026-05-21 10:36:47 +03:00
2026-06-02 17:59:30 +02:00
2026-06-03 10:21:32 +03:00
2026-05-21 21:31:22 +02:00
2026-05-21 21:13:55 +02:00
2026-05-22 16:47:48 +03:00
2026-06-02 12:26:44 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-05-22 09:42:34 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-26 15:01:01 +03:00
2026-05-26 15:01:01 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-06-01 13:56:01 +02:00
2026-05-21 21:13:55 +02:00
2026-06-01 18:30:55 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-06-01 18:30:55 +02:00
2026-05-26 14:02:20 +02:00
2026-05-21 21:13:55 +02:00
2026-06-01 13:03:29 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-17 22:16:31 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-04-12 19:46:33 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:13:55 +02:00
2026-06-02 12:26:44 +03:00
2026-05-21 10:22:07 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:33:24 +02:00
2026-05-21 21:13:55 +02:00
2026-05-21 10:36:47 +03:00
2026-06-01 13:03:29 +03:00
2026-06-01 18:30:55 +02:00
2026-05-21 10:36:47 +03:00
2026-05-29 13:51:43 +03:00
2026-05-21 21:13:55 +02:00
2026-05-25 14:22:04 +03:00
2026-05-29 12:51:31 +02:00
2026-05-21 10:36:47 +03:00
2026-05-24 10:25:08 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-06-01 13:03:29 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:13:55 +02:00
2026-05-21 21:31:22 +02:00
2026-05-21 21:13:55 +02:00
2026-05-21 21:13:55 +02:00
2026-05-21 21:33:19 +02:00
2026-05-21 21:13:55 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:50:00 +03:00
2026-05-21 21:33:19 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-04-12 19:46:33 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-05-21 10:36:47 +03:00
2026-06-01 13:03:29 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-04-12 19:46:33 +03:00
2026-06-01 19:41:19 +02:00
2026-05-12 23:20:55 +02:00
2026-05-21 10:36:47 +03:00
2026-06-01 18:30:55 +02:00
2026-05-22 11:58:37 +02:00
2026-05-21 10:36:47 +03:00
2026-06-02 14:12:48 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-06-01 18:30:55 +02:00
2026-05-21 10:36:47 +03:00
2026-05-22 15:03:47 +03:00
2026-05-21 21:13:55 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:13:55 +02:00
2026-05-26 15:01:01 +03:00
2026-05-21 21:13:55 +02:00
2026-05-26 15:01:01 +03:00
2026-05-26 15:01:01 +03:00
2026-05-21 21:31:22 +02:00
2026-06-01 20:07:03 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-05-05 18:56:37 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:31:22 +02:00
2026-06-01 18:30:55 +02:00
2026-05-21 21:31:22 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 21:13:55 +02:00
2026-05-26 15:01:01 +03:00
2026-05-12 12:38:25 +03:00
2026-05-21 15:43:36 +02:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 15:11:58 +02:00
2026-05-26 10:43:22 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-05-21 10:36:47 +03:00
2026-04-30 21:27:56 +03:00