SEZ9 commented on PR #12211: URL: https://github.com/apache/seatunnel/pull/12211#issuecomment-7116363499
Thanks for the update. The conditional decrement looks right: a completion no longer discharges an entry that cleanup already removed. The reset test is also more realistic now that it goes through the real cleanup. The points below from the previous review are still open. - **Registration is not covered by the accounting lock.** `pendingAccountingLock` pairs remove/decrement with clear/reset, but the `pendingCheckpoints` insertion still happens asynchronously outside both locks, and the reservation is not paired with registering the entry. A trigger can reserve 1, cleanup can reset to 0 before the insertion lands, and the stale entry is then inserted, completes, and decrements a reservation it no longer owns. Because `restoreCoordinator()` runs that cleanup and then sets `shutdown=false` on the same coordinator, nothing fences the late entry. Please either make reservation and insertion one unit under the same lock as clear/reset, or reject entries created before a cleanup instead of registering them. - **Tests do not cover the new lock or the moved reservation.** Both new tests are single-threaded and only exercise the conditional decrement. Please add coverage for the interleaving above, where cleanup lands between reservation and insertion. The reset case should also model a newer reservation existing when the stale entry completes. One test name claims a concurrent removal that never happens, so please rename it or make it concurrent. - **Title and description still say test-only.** The PR now changes checkpoint accounting in `CheckpointCoordinator.java`, so please update both to describe the production change. - **Comments and Javadoc need another pass.** The comment on the new lock is terse and partly inaccurate; please state exactly which operations it guards. Please also update the surrounding Javadoc for the new locking rule, and add Javadoc to the second test and the helper. Once registration is covered and there is a test for that interleaving, I'm happy to take another look. <!-- streview-comment:2569 --> -- 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]
