Pavel Emelyanov
0cd3a6993b
sstables: Don't rely on lexicographical prefix comparison
...
When creating a deletion log for a bunch of sstables the code checks
that all sstables share the same "storage" by lexicographically
comparing their prefixes. That's not correct, as filesystem paths may
refer to the same directory even if not being equal.
So far that's been mostly OK, because paths manipulations were done in
simple forms without producing unequal paths. Patch 8a061bd8 (sstables,
code: Introduce and use change_state() call) triggerred a corner case.
fs::path foo("/foo");
sstring sub("");
foo = foo / sub;
produces a correct path of "/foo/", but the trailing slash breaks the
aforementioned assumption about prefixes comparison. As a result, when
an sstable moves between, say, staging and normal locations it may gain
a trailing slash breaking the deletion log creation code.
The fix is to restrict the deletion log creation not to rely on path
strings comparison completely and trim the trailing slash if it happens.
A test is included.
fixes : #13085
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com >
Closes #13090
2023-03-12 20:06:47 +02:00
..
2023-03-07 17:54:53 +08:00
2023-02-15 11:09:04 +02:00
2023-02-28 21:56:53 +08: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-02-15 11:01:50 +02: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-02-01 20:14:51 -03:00
2023-02-19 21:05:45 +02:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-19 12:58:22 +08:00
2023-02-01 20:14:51 -03:00
2023-03-04 13:11:25 +08:00
2023-02-01 20:14:51 -03:00
2023-03-06 13:28:36 +03:00
2023-02-15 11:01:50 +02: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-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2022-11-16 16:30:38 +02:00
2023-02-28 21:56:53 +08:00
2023-03-06 13:28:36 +03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:09:04 +02:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-03-09 18:31:45 +01:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-03-01 09:58:14 +02: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-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-17 07:19:52 +02:00
2023-02-01 20:14:51 -03:00
2022-08-08 08:02:27 +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-02-19 21:05:45 +02:00
2023-02-19 21:05:45 +02: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-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:55 +08:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:48:24 +02:00
2023-02-15 11:01:50 +02:00
2023-02-19 21:05:45 +02:00
2023-02-14 11:19:03 +02: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-02-15 11:01:50 +02:00
2023-02-14 11:19:03 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-03-07 08:45:04 +03:00
2023-02-03 19:04:32 +01:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-03-12 14:04:34 +02:00
2023-03-09 08:21:48 +03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-03-07 17:54:53 +08:00
2023-02-19 21:05:45 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-28 20:04:22 +02:00
2023-02-28 21:56:53 +08:00
2023-03-09 08:21:48 +03:00
2023-03-09 08:21:48 +03:00
2023-02-01 20:14:51 -03:00
2023-03-09 08:21:48 +03:00
2023-02-10 07:11:38 +02:00
2023-03-12 20:06:47 +02:00
2023-03-09 08:21:48 +03:00
2023-02-17 17:58:26 +03:00
2023-02-28 21:56:53 +08:00
2023-03-09 08:21:48 +03:00
2023-03-09 08:21:48 +03:00
2023-02-15 11:01:50 +02: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-02-01 20:17:16 -03:00
2022-07-27 16:58:52 +03:00
2023-02-15 11:09:04 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-19 21:05:45 +02:00
2023-03-09 17:51:15 +01:00
2023-02-28 21:56:53 +08:00
2023-03-06 12:59:41 +02:00
2023-03-06 13:17:21 +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-02-27 15:09:42 +02:00
2023-03-06 13:17:21 +03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-03-09 11:54:38 +01:00
2023-03-09 11:54:38 +01:00