rocksdb/java
Xingbo Wang 656b734a5f Support abort background compaction jobs. (#14227)
Summary:
This adds a new public API to allow applications to abort all running compactions and prevent new ones from starting. Unlike DisableManualCompaction() which only pauses manual compactions and waits for them to finish naturally, AbortAllCompactions() actively signals running compactions (both automatic and manual) to terminate early and waits for them to complete before returning.

The abort signal is checked periodically during compaction (every 100 keys), so ongoing compactions abort quickly. Any output files from aborted compactions are automatically cleaned up to prevent partial results from being installed.

This is useful for scenarios where applications need to quickly stop all compaction activity, such as during graceful shutdown or when performing maintenance operations.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/14227

Test Plan:
- Unit tests in db_compaction_abort_test.cc cover various abort scenarios including: abort before/during compaction, abort with multiple subcompactions, nested abort/resume calls, abort with CompactFiles API, abort across multiple column families, and timing guarantees
- Updated compaction_job_test.cc to include the new parameter

Reviewed By: anand1976

Differential Revision: D91480994

Pulled By: xingbowang

fbshipit-source-id: 36837971d8a540cd34d3ec28a78bc94b582625b0
2026-01-30 05:53:04 -08:00
..
benchmark/src/main/java/org/rocksdb/benchmark Remove deprecated Options::access_hint_on_compaction_start (#11654) 2024-02-05 13:35:19 -08:00
crossbuild Pass build parallelism flag to Docker builds (#12392) 2024-02-28 12:51:00 -08:00
jmh JNI get_helper code sharing / multiGet() use efficient batch C++ support (#12344) 2024-03-12 12:42:08 -07:00
rocksjni Support abort background compaction jobs. (#14227) 2026-01-30 05:53:04 -08:00
samples/src/main/java Remove compressed block cache (#11117) 2023-01-24 17:09:19 -08:00
src Support abort background compaction jobs. (#14227) 2026-01-30 05:53:04 -08:00
CMakeLists.txt Update window build cmake to download newer snappy version and Java cmake_minimum_required (#13514) 2025-04-02 15:46:02 -07:00
GetPutBenchmarks.md Java API consistency between RocksDB.put() , .merge() and Transaction.put() , .merge() (#11019) 2023-12-11 11:03:17 -08:00
HISTORY-JAVA.md Update JAVA-HISTORY.md for v3.13 2015-08-04 18:12:58 -07:00
jdb_bench.sh Add copyright headers per FB open-source checkup tool. (#5199) 2019-04-18 10:55:01 -07:00
Makefile Add native logger support to RocksJava (#12213) 2024-01-17 17:51:36 -08:00
pmd-rules.xml Java API consistency between RocksDB.put() , .merge() and Transaction.put() , .merge() (#11019) 2023-12-11 11:03:17 -08:00
pom.xml.template Perform java static checks in CI (#11221) 2023-10-17 10:04:35 -07:00
RELEASE.md Add shared library for musl-libc (#3143) 2019-11-26 18:24:09 -08:00
spotbugs-exclude.xml Perform java static checks in CI (#11221) 2023-10-17 10:04:35 -07:00
understanding_options.md New-style blob option bindings, Java option getter and improve/fix option parsing (#8999) 2021-10-19 09:21:52 -07:00