damccorm opened a new pull request, #40205: URL: https://github.com/apache/beam/pull/40205
Previously, `RestrictionTrackerObserverWithProgress.getProgress` only used `lock.tryLock` with a timeout until initial progress was reported (`!hasInitialProgress`), falling back to an unbounded blocking `getProgressBlocking()` call afterwards. If a subsequent `tryClaim` or `trySplit` held the lock for a long duration, `getProgress()` would still block indefinitely. This change caches `lastProgress` (initialized to `Progress.NONE`) and always uses `lock.tryLock(timeOutSec, TimeUnit.SECONDS)` in `getProgress`, updating `lastProgress` when the lock is acquired and returning the last known progress if lock acquisition times out. This also removes the redundant nested lock acquisition in `getProgressBlocking()`. -- 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]
