zhuqi-lucas commented on PR #23532:
URL: https://github.com/apache/datafusion/pull/23532#issuecomment-4958476995

   > `current()` can race with a concurrent `update()`: a call that observed an 
older `generation` may finish later and overwrite the cache entry for a newer 
generation.
   
   Good catch @copilot-pull-request-reviewer. Fixed in 
[8041f43ea](https://github.com/apache/datafusion/pull/23532/commits/8041f43ea): 
the slow-path write now only publishes if the observed `generation` is at least 
as fresh as whatever is currently cached. Correctness was unchanged (generation 
mismatch already forced a recompute), but this preserves the freshness 
invariant so concurrent slow callers can't demote a newer entry.


-- 
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]

Reply via email to