C API: add rocksdb_delete_range_cf_with_ts for user-defined timestamps
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with include/rocksdb/c.h and compare the existing rocksdb_delete_range_cf and rocksdb_delete_cf_with_ts declarations. Then inspect db/c.cc and db/c_test.c for their corresponding implementation and timestamped-delete test patterns. Done means the new entry point forwards the timestamped range deletion, the C test covers it, and the unreleased_history note is updated.
Written by the indexing model from the issue text.
Description
Summary
The C API has no way to issue a range deletion with a user-defined timestamp. DB::DeleteRange has had a UDT overload (DeleteRange(const WriteOptions&, ColumnFamilyHandle*, const Slice& begin, const Slice& end, const Slice& ts)) on the C++ side for years, but the C API only exposes the non-timestamped rocksdb_delete_range_cf. There is no rocksdb_delete_range_cf_with_ts.
This leaves a gap for C and FFI consumers (e.g. the rust-rocksdb bindings): on a column family that enables user-defined timestamps, you can issue timestamped point deletes (rocksdb_delete_cf_with_ts, rocksdb_singledelete_cf_with_ts) but you cannot issue a timestamped range delete at all.
Background
The original UDT C-API work (#9889 / #9914) added timestamped Get, MultiGet, Delete, and SingleDelete, but did not include range deletes. This issue tracks completing that surface with the one missing entry point.
Proposed API
extern ROCKSDB_LIBRARY_API void rocksdb_delete_range_cf_with_ts(
rocksdb_t* db, const rocksdb_writeoptions_t* options,
rocksdb_column_family_handle_t* column_family, const char* start_key,
size_t start_key_len, const char* end_key, size_t end_key_len,
const char* ts, size_t tslen, char** errptr);
A thin forwarder to the existing C++ overload, modeled exactly on rocksdb_delete_cf_with_ts (for the Slice(ts, tslen) + SaveError pattern) and rocksdb_delete_range_cf (for the begin/end key plumbing).
Environment
- RocksDB:
main(also reproduces on the 11.x releases) - C API header:
include/rocksdb/c.h
I have a patch ready (header declaration, db/c.cc implementation, a db/c_test.c case covering write-at-ts then delete-range-at-later-ts then read-at-later-ts, and an unreleased_history note) and am happy to open a PR.
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebook/rocksdb
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
All issues in facebook/rocksdb
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·