korlov42 opened a new pull request, #4896: URL: https://github.com/apache/ignite-3/pull/4896
https://issues.apache.org/jira/browse/IGNITE-23940 This patch addresses two issues related to AsyncRootNode: - The race between `flush()` invocation triggered by prefetch and adding the very first request to `pendingRequests` collection. If thread requesting a batch is stuck in the middle of `if` condition in `scheduleTask()` method (i.e. request is added to collection and `!pendingRequests.isEmpty()` returned true), then second thread finishing prefetch may process this request and reset the `taskScheduled` flag before it has been set, resulting in skipping scheduling a task during consequent `requestNextAsync()` call - Missed rescheduling a task when several requests has been added before prefetch is complete (covered by `AsyncRootNodeTest#ensureRootNodeProperlyHandlesConcurrentRequest` test) ----------- Thank you for submitting the pull request. To streamline the review process of the patch and ensure better code quality we ask both an author and a reviewer to verify the following: ### The Review Checklist - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following: \- There is a single JIRA ticket related to the pull request. \- The web-link to the pull request is attached to the JIRA ticket. \- The JIRA ticket has the Patch Available state. \- The description of the JIRA ticket explains WHAT was made, WHY and HOW. \- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue. - [ ] **Design:** new code conforms with the design principles of the components it is added to. - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable. - [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed. - [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources. ### Notes - [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide) -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org