[hotifx-to-7.5] raftstore: support rocksdb writes during ingestion #18096#18520
Merged
overvenus merged 3 commits intotikv:add-index-ingest-allow-writefrom Jun 7, 2025
Merged
Conversation
…kv#18096 Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
overvenus
approved these changes
Jun 6, 2025
v01dstar
approved these changes
Jun 6, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: overvenus, v01dstar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
Signed-off-by: Neil Shen <overvenus@gmail.com>
7d3f332
into
tikv:add-index-ingest-allow-write
2 of 3 checks passed
ti-chi-bot bot
pushed a commit
that referenced
this pull request
Jun 10, 2025
Rollup of following sst ingestion optimizations * raftstore: directly write kvs rather than ingestion when merging small regions. (#17408) (#18518) * raftstore: remove stale ranges by DeleteByKeys rather than ingesting. (#18040) (#18519) * raftstore: support rocksdb writes during ingestion #18096 (#18520) * storage: support online config for flow-control module (#17396). (#18523) * sst_importer: allow write during ingesting sst (#18514) (#18522) Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com> Co-authored-by: lucasliang <nkcs_lykx@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a manual CP of #18096
This PR implements the proposal described in issue #18081. With this change, the P99 apply wait duration is significantly reduced.
New metrics RocksDB-kv->Ingest SST allow_write:

Summary
Enabled RocksDB’s allow_write option to reduce the latency impact of SST file ingestion on foreground operations, while introducing a range latch mechanism to ensure correctness.
Key Changes
The specific changes include:
The reason for introducing a range latch is that in TiKV, operations such as applying snapshots during region creation, handling foreground writes in normal operation, and destroying peers are all executed sequentially. However, the Compaction Filter GC operates as a dedicated background thread, making it the only component that might run concurrently and write default CF with SST ingestion. To handle this potential concurrency, the RangeLatch ensures there are no overlapping ranges between these two concurrent operations, maintaining correctness.
What is changed and how it works?
Issue Number: Close #18081
What's Changed:
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note