You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "platinumhamburg (via GitHub)" <gi...@apache.org> on 2026/10/20 03:18:25 UTC
[I] [kv] Iterate prefix lookups outside the KV lock with a fixed read view [fluss]
platinumhamburg opened a new issue, #4747:
URL: https://github.com/apache/fluss/issues/4747
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Motivation
`KvTablet.prefixLookup` holds the KV read lock while RocksDB seeks, iterates, copies values, and converts the results. A long prefix scan therefore delays operations that need the KV write lock, including writes and asynchronous flushes.
### Solution
Create a request-scoped RocksDB iterator under the KV read lock, together with a `ResourceGuard.Lease`. A normal iterator fixes its read view when it is created. Release the KV read lock before seeking, iterating, and converting values, while retaining the lease until all native read resources have been closed.
Keep the existing replica leader/ISR read lock, per-prefix visibility, RPC interfaces, and configuration defaults. Reject reads after tablet shutdown begins. Ensure failure cleanup releases every resource and never reacquires the KV lock. Check close/drop completion ordering so directory deletion and shared-resource disposal cannot overtake an active read.
Add deterministic concurrency tests for stable results during updates/deletes/inserts, writer progress before scan completion, close/drop waiting, and exceptional cleanup.
### Anything else?
This complements #4743, which bounds native prefix iteration and removes per-row key copies. This issue addresses KV lock duration without introducing Prefix Bloom or changing RPC scheduling.
### Willingness to contribute
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [kv] Iterate prefix lookups outside the KV lock with a fixed read view [fluss]
Posted by "platinumhamburg (via GitHub)" <gi...@apache.org>.
platinumhamburg closed issue #4747: [kv] Iterate prefix lookups outside the KV lock with a fixed read view
URL: https://github.com/apache/fluss/issues/4747
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org