rionmonster opened a new pull request, #27459: URL: https://github.com/apache/flink/pull/27459
## What is the purpose of the change This pull request addresses the issue detailed in [FLINK-38783](https://issues.apache.org/jira/browse/FLINK-38783) which detailed how the registration process within `TieredStorageResourceRegistry` was not properly handling concurrent operations and as such could throw a `ConcurrentModificationException` under concurrent load. ## Brief change log - Replaced the previous `registeredResources` general-purpose hash map (`Map<..., List<...>>`) with corresponding thread-safe structures (`ConcurrentHashMap<..., CopyOnWriteArrayList<...>>`) to better handle concurrent operations. ## Verifying this change This change added a series of tests in `TieredStorageResourceRegistryTest` to originally reproduce the issue and later confirm the fix worked as expected including: - `testConcurrentRegisterResource` to test concurrent resource registration across separate threads (10 total with same owner/identifier) - `testConcurrentRegisterResourceWithDifferentOwners` to test concurrent registration across separate threads (10 total with different owners/identifiers) - `testConcurrentRegisterAndClear` to test concurrent registration _and_ clearing across separate threads ### Example Tests <img width="828" height="344" alt="image" src="https://github.com/user-attachments/assets/2b33eeae-b874-4360-bb1e-924634c3f2a8" /> ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): **no** - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no** - The serializers: **no** - The runtime per-record code paths (performance sensitive): **no** - Anything that affects deployment or recovery: **no/don't know** - The S3 file system connector: **no** ## Documentation - Does this pull request introduce a new feature? **no** - If yes, how is the feature documented? **not applicable** -- 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]
