nicktindall commented on PR #16865: URL: https://github.com/apache/lucene/pull/16865#issuecomment-6283319275
Because `files()` and `fileLength` throw `IOException` it makes the `updateAndGet` a bit cumbersome if we want to propagate the `IOException`. We could do a `get`, `compute if -1`, `compare-and-set` but I don't think it changes the race semantics over the volatile read/write in any meaningful way. We could add another generation, then we'd know when the computation was stale, and solve the concurrent advance/compute race but we're starting to get into more major change territory than what I had originally intended. -- 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]
