zhuqi-lucas commented on PR #23532: URL: https://github.com/apache/datafusion/pull/23532#issuecomment-4964908005
Thanks for the review @adriangb! Addressed both nits in [bbc0f31af](https://github.com/apache/datafusion/pull/23532/commits/bbc0f31af): 1. **`>=` → `>`**: You're right, same-generation writes are redundant (identical remap output). Tightened the guard so it only skips + saves the write-lock take when there's already an entry at the same generation. 2. **Concurrency test**: Added `test_current_cache_concurrent_readers_and_writer` — spawns 8 reader threads hot-looping `current()` while one writer fires 200 `update()`s. Asserts: - `current()` never fails or panics - The cached generation observed by each reader is monotonically non-decreasing - After the writer finishes and one final `current()` flushes, cache generation equals `inner.generation` This should derisk the "single-thread OK, 128-partition prod breaks" class you were worried about. All 22 tests still pass. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
