phet commented on code in PR #3844:
URL: https://github.com/apache/gobblin/pull/3844#discussion_r1418059366
##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/publisher/CopyDataPublisher.java:
##########
@@ -222,6 +223,80 @@ private void preserveFileAttrInPublisher(CopyableFile
copyableFile) throws IOExc
}
}
+ /** Organizes and encapsulates access to {@link WorkUnitState}s according to
useful access patterns. */
+ @AllArgsConstructor
+ private static class WorkUnitStatesHelper {
Review Comment:
I don't see mis-identification as the underlying reason for the regression.
rather it was more likely not appreciating how presumptuous
`WorkUnitState::getWorkingState()` is about the WU it's invoked on having
already executed. I doubt it was clear (certainly it shocked me!) that it
would fall back on the enclosing job's state to provide state for a WU that had
itself never run!
as for the `WorkUnitStatesHelper`, I don't presently foresee utility
anywhere beyond `CopyDataPublisher`
--
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]