Alex Chi Z.
4c4cb80186
fix(pageserver): fix gc-compaction racing with legacy gc ( #10052 )
...
## Problem
close https://github.com/neondatabase/neon/issues/10049 , close
https://github.com/neondatabase/neon/issues/10030 , close
https://github.com/neondatabase/neon/issues/8861
part of https://github.com/neondatabase/neon/issues/9114
The legacy gc process calls `get_latest_gc_cutoff`, which uses a Rcu
different than the gc_info struct. In the gc_compaction_smoke test case,
the "latest" cutoff could be lower than the gc_info struct, causing
gc-compaction to collect data that could be accessed by
`latest_gc_cutoff`. Technically speaking, there's nothing wrong with
gc-compaction using gc_info without considering latest_gc_cutoff,
because gc_info is the source of truth. But anyways, let's fix it.
## Summary of changes
* gc-compaction uses `latest_gc_cutoff` instead of gc_info to determine
the gc horizon.
* if a gc-compaction is scheduled via tenant compaction iteration, it
will take the gc_block lock to avoid racing with functionalities like
detach ancestor (if it's triggered via manual compaction API without
scheduling, then it won't take the lock)
---------
Signed-off-by: Alex Chi Z <chi@neon.tech >
Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com >
2024-12-09 20:06:06 +00:00
..
2024-09-12 23:18:41 +01:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-10-29 11:39:09 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-11-11 18:07:01 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-31 14:44:59 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-11-25 09:01:05 +00:00
2024-12-09 20:06:06 +00:00
2024-11-21 16:25:31 +00:00
2024-11-28 21:38:30 +00:00
2024-11-08 12:19:18 -06:00
2024-12-06 17:43:55 +00:00
2024-10-08 14:32:26 -05:00
2024-11-27 12:12:21 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-11-22 14:31:36 +00:00
2024-12-03 22:07:03 +00:00
2024-11-11 18:07:01 +00:00
2024-10-08 14:32:26 -05:00
2024-11-25 09:01:05 +00:00
2024-10-18 15:07:36 +03:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-11-22 22:47:06 +00:00
2024-10-31 14:44:59 +00:00
2024-11-21 16:25:31 +00:00
2024-11-22 19:27:04 +00:00
2024-10-08 14:32:26 -05:00
2024-11-11 18:07:01 +00:00
2024-11-11 18:07:01 +00:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-11-25 09:01:05 +00:00
2024-11-25 09:01:05 +00:00
2024-11-25 09:01:05 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-09-16 16:38:55 +01:00
2024-10-08 14:32:26 -05:00
2024-11-11 18:07:01 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-10-18 12:42:41 +02:00
2024-10-08 14:32:26 -05:00
2024-11-25 09:01:05 +00:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-11-21 16:25:31 +00:00
2024-11-19 22:29:57 +02:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-11-04 17:42:08 +01:00
2024-12-02 10:26:15 +00:00
2024-12-03 22:07:03 +00:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-11-21 16:25:31 +00:00
2024-10-08 14:32:26 -05:00
2024-11-13 08:50:01 +02:00
2024-12-01 12:23:10 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-12-01 15:47:28 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-11-08 14:43:15 -06:00
2024-12-04 12:58:35 +00:00
2024-11-25 09:01:05 +00:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-10-18 11:25:45 +01:00
2024-11-21 16:25:31 +00:00
2024-10-08 14:32:26 -05:00
2024-12-03 08:59:38 +00:00
2024-11-22 14:31:36 +00:00
2024-12-07 13:05:09 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-11-27 12:12:21 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-11-08 14:43:15 -06:00
2024-12-03 20:39:10 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-08 14:32:26 -05:00
2024-10-28 17:47:15 -05:00
2024-11-25 09:01:05 +00:00
2024-11-14 17:19:13 +02:00
2024-11-27 12:12:21 +00:00
2024-12-02 10:26:15 +00:00
2024-12-02 10:26:15 +00:00
2024-11-08 12:19:18 -06:00
2024-10-08 14:32:26 -05:00