rionmonster opened a new pull request, #1872: URL: https://github.com/apache/fluss/pull/1872
### Purpose Linked Issue: Close #1855 Per Issue https://github.com/apache/fluss/issues/1855, this pull request addresses a potential issue that could arise during the `remove()` operation for `TimerTaskEntry` that could result in a null pointer exception being thrown. This was possible as the underlying object to support the internal list was volatile and subject to operations from other threads. ### Brief change log Update the logic within the `TimerTaskEntry.remove()` operation to use a more concurrency-safe single-read snapshot pattern to avoid separate reads (e.g., reading during iteration _and_ within the body as well). These changes were originally reproduced via a newly added unit test and retained to ensure the issue was resolved as expected. ### Tests Added a new `TimerTaskEntryTest` class along with an associated `TimerTaskEntryTest.testRemoveEnsuresCurrentListIsNeverNull` case that originally reproduced this issue (via concurrent, oscillating add/removals across separate threads) which was eventually updated _after the fix was applied_ to confirm the exception will no longer be thrown. ### API and Format No ### Documentation No -- 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]
