Jay Huh
778f25fbbd
Rely on PurgeObsoleteFiles Only for Options file clean up when remote compaction is enabled ( #13139 )
...
Summary:
In PR https://github.com/facebook/rocksdb/issues/13074 , we added a logic to prevent stale OPTIONS file from getting deleted by `PurgeObsoleteFiles()` if the OPTIONS file is being referenced by any of the scheduled the remote compactions.
`PurgeObsoleteFiles()` was not the only place that we were cleaning up the old OPTIONS file. We've been also directly cleaning up the old OPTIONS file as part of `SetOptions()`: `RenameTempFileToOptionsFile()` -> `DeleteObsoleteOptionsFiles()` unless FileDeletion is disabled.
This was not caught by the UnitTest because we always preserve the last two OPTIONS file. A single call of `SetOptions()` was not enough to surface this issue in the previous PR.
To keep things simple, we are just skipping the old OPTIONS file clean up in `RenameTempFileToOptionsFile()` if remote compaction is enabled. We let `PurgeObsoleteFiles()` clean up the old options file later after the compaction is done.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/13139
Test Plan:
Updated UnitTest to reproduce the scenario. It's now passing with the fix.
```
./compaction_service_test --gtest_filter="*PreservedOptionsRemoteCompaction*"
```
Reviewed By: cbi42
Differential Revision: D65974726
Pulled By: jaykorean
fbshipit-source-id: 1907e8450d2ccbb42a93084f275e666648ef5b8c
2024-11-18 07:55:39 -08:00
..
2024-10-31 16:45:35 -07:00
2024-11-18 07:55:39 -08:00
2024-11-18 07:55:39 -08:00
2024-05-20 17:04:14 -07:00
2024-09-20 15:54:19 -07:00
2024-10-16 12:34:57 -07:00
2024-04-16 08:45:38 -07:00
2024-11-06 18:09:07 -08:00
2024-10-17 14:13:20 -07:00
2024-06-18 10:51:29 -07:00
2024-09-19 14:05:21 -07:00
2024-09-19 14:05:21 -07:00
2024-04-16 08:45:38 -07:00
2024-11-06 18:09:07 -08:00
2024-10-14 12:28:35 -07:00
2024-10-25 09:32:14 -07:00
2024-10-31 16:45:35 -07:00
2024-04-26 20:05:30 -07:00
2024-03-04 10:08:32 -08:00
2023-08-08 17:26:50 -07:00
2024-10-17 14:13:20 -07:00
2024-02-07 10:44:11 -08:00
2024-03-04 10:08:32 -08:00
2024-09-19 14:05:21 -07:00
2024-10-25 10:24:54 -07:00
2024-10-25 10:24:54 -07:00
2023-05-18 13:25:01 -07:00
2024-03-22 13:40:42 -07:00
2024-09-19 15:50:41 -07:00
2024-02-07 10:44:11 -08:00
2023-01-27 13:14:19 -08:00
2024-07-01 23:29:02 -07:00
2024-05-30 14:53:13 -07:00
2024-08-12 21:09:37 -07:00
2024-02-05 10:26:41 -08:00
2022-06-27 16:37:09 -07:00
2024-11-12 09:41:03 -08:00
2024-01-05 11:53:57 -08:00
2024-03-14 15:44:55 -07:00
2024-10-31 16:45:16 -07:00
2024-10-16 12:34:57 -07:00
2024-05-15 19:11:52 -07:00
2024-08-08 13:34:11 -07:00
2024-03-12 12:54:53 -07:00
2023-01-27 13:14:19 -08:00
2024-08-19 13:53:25 -07:00
2024-03-15 12:25:49 -07:00
2023-10-02 16:25:25 -07:00
2024-10-25 10:24:54 -07:00
2024-06-18 10:46:55 -07:00
2024-05-29 15:03:15 -07:00
2024-07-01 16:14:19 -07:00
2023-10-18 09:38:38 -07:00
2024-10-16 19:20:37 -07:00
2024-09-18 13:27:44 -07:00
2023-12-08 17:12:11 -08:00
2024-03-04 10:08:32 -08:00
2024-02-07 10:44:11 -08:00
2024-09-20 15:54:19 -07:00
2024-08-16 15:34:31 -07:00
2024-08-23 19:49:25 -07:00
2024-10-09 12:51:19 -07:00
2024-08-16 15:34:31 -07:00
2024-09-17 14:10:33 -07:00
2024-09-20 15:54:19 -07:00
2024-02-07 10:44:11 -08:00
2022-05-19 18:39:41 -07:00
2022-05-19 18:39:41 -07:00
2024-02-07 10:44:11 -08:00
2024-05-21 10:17:34 -07:00
2024-07-22 14:27:31 -07:00
2024-10-03 17:57:50 -07:00
2024-10-14 12:28:35 -07:00
2024-04-17 17:33:27 -07:00
2024-06-26 18:17:05 -07:00
2024-09-17 14:10:33 -07:00
2024-09-17 14:10:33 -07:00
2024-08-21 16:24:18 -07:00
2023-01-27 13:14:19 -08:00
2024-09-18 15:26:37 -07:00
2024-10-25 09:32:14 -07:00
2024-10-25 09:32:14 -07:00
2024-10-15 17:22:01 -07:00
2024-10-16 14:11:22 -07:00
2024-07-15 10:28:34 -07:00
2022-11-02 14:34:24 -07:00
2023-07-03 09:41:48 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2024-10-14 12:28:35 -07:00
2024-10-14 12:28:35 -07:00
2024-06-18 10:51:29 -07:00
2023-01-27 13:14:19 -08:00
2024-10-17 14:13:20 -07:00
2024-03-15 15:37:37 -07:00
2023-02-22 12:28:18 -08:00
2024-10-17 14:13:20 -07:00
2023-06-15 12:25:04 -07:00
2024-10-04 15:01:54 -07:00
2024-10-17 14:13:20 -07:00
2024-06-18 10:46:55 -07:00
2024-10-16 09:22:51 -07:00
2023-04-25 12:08:23 -07:00
2024-07-31 13:28:17 -07:00
2023-05-11 17:26:19 -07:00
2024-05-22 15:34:37 -07:00
2024-03-21 12:29:35 -07:00
2024-05-22 15:34:37 -07:00
2024-07-29 13:51:49 -07:00
2024-06-12 11:48:45 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2024-02-07 10:44:11 -08:00
2023-01-27 13:14:19 -08:00
2023-12-04 11:17:32 -08:00
2024-08-08 13:34:11 -07:00
2024-10-02 17:19:18 -07:00
2024-10-02 17:19:18 -07:00
2024-10-14 12:28:35 -07:00
2024-10-14 12:28:35 -07:00
2024-03-15 12:25:49 -07:00
2022-10-31 22:28:58 -07:00
2024-03-14 15:44:55 -07:00
2023-12-05 14:07:42 -08:00
2023-09-11 16:32:32 -07:00
2024-02-07 10:44:11 -08:00
2024-11-06 18:09:07 -08:00
2024-10-20 20:53:08 -07:00
2024-02-13 18:36:25 -08:00
2023-12-04 11:17:32 -08:00
2024-01-31 16:30:26 -08:00
2024-01-31 16:30:26 -08:00
2024-02-29 15:08:26 -08:00
2024-02-07 10:44:11 -08:00
2024-03-04 06:32:50 -08:00
2023-10-04 14:14:22 -07:00
2024-02-07 10:44:11 -08:00
2024-02-07 10:44:11 -08:00
2022-06-10 16:07:03 -07:00
2021-09-10 10:00:26 -07:00
2023-12-04 11:17:32 -08:00
2022-10-25 11:33:04 -07:00
2023-02-22 12:28:18 -08:00
2024-03-22 13:40:42 -07:00
2024-03-22 13:40:42 -07:00
2022-12-19 15:06:22 -08:00
2024-01-29 11:37:34 -08:00
2024-10-14 12:28:35 -07:00
2021-09-10 10:00:26 -07:00
2023-12-04 11:17:32 -08:00
2024-11-06 18:10:15 -08:00
2024-03-14 15:44:55 -07:00
2024-06-18 10:51:29 -07:00
2024-06-18 10:51:29 -07:00
2024-10-25 09:32:14 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2024-10-17 14:13:20 -07:00
2024-10-31 16:45:35 -07:00
2024-10-17 14:13:20 -07:00
2024-06-18 10:51:29 -07:00
2022-11-02 14:34:24 -07:00
2024-06-18 10:51:29 -07:00
2024-05-28 09:24:49 -07:00
2024-05-28 09:24:49 -07:00
2022-11-02 14:34:24 -07:00
2024-01-16 11:15:23 -08:00
2024-10-31 16:45:35 -07:00
2024-10-17 14:13:20 -07:00
2024-10-17 14:13:20 -07:00
2024-08-21 10:09:10 -07:00
2023-12-04 11:17:32 -08:00
2024-07-19 16:14:54 -07:00
2024-10-25 09:32:14 -07:00
2024-10-17 14:13:20 -07:00
2024-11-12 09:41:03 -08:00
2024-11-12 09:41:03 -08:00
2024-11-12 09:41:03 -08:00
2023-12-29 15:29:23 -08:00
2022-07-21 13:35:36 -07:00
2022-07-21 13:35:36 -07:00
2022-07-21 13:35:36 -07:00
2023-12-29 15:29:23 -08:00
2024-07-01 23:29:02 -07:00
2024-07-01 23:29:02 -07:00
2024-11-06 18:10:15 -08:00
2024-09-20 15:54:19 -07:00
2024-11-06 18:10:15 -08:00
2024-05-31 19:30:19 -07:00
2022-11-02 14:34:24 -07:00
2022-11-02 14:34:24 -07:00
2023-04-05 14:42:31 -07:00
2024-01-29 10:38:08 -08:00
2024-05-31 19:30:19 -07:00
2024-05-31 19:30:19 -07:00