Uh oh!
There was an error while loading. Please reload this page.
TEZ-4061: InputAttemptIdentifier and CompositeInputAttemptIdentifier cannot be compared for equality - #326
Conversation
tez-yetus
commented
Jan 19, 2024
💔 -1 overall
This message was automatically generated. |
BsoBird
commented
Oct 24, 2024
@abstractdog |
| private void processInputFailedEvent(InputFailedEvent ife) { | ||
| InputAttemptIdentifier srcAttemptIdentifier = new InputAttemptIdentifier(ife.getTargetIndex(), ife.getVersion()); | ||
| LOG.info("Marking obsolete input: " + inputContext.getSourceVertexName() + " " + srcAttemptIdentifier); |
| return new InputAttemptIdentifier(getInputIdentifier() + inputIdentifierOffset, getAttemptNumber(), getPathComponent(), isShared(), getFetchTypeInfo(), getSpillEventId()); | ||
| } | ||
| public boolean include(int thatInputIdentifier, int thatAttemptNumber) { |
There was a problem hiding this comment.
few notes:
nit: this is more like "includes" because the method answers a question like whether this composite identifier includes another one, rather than taking and action
this method would be simpler with a single param:
includes(InputAttempIdentifier inputAttemptIdentifier)
- can you please add a method javadoc about what "includes" exactly means in this context
There was a problem hiding this comment.
I agree that includes is more appropriate for the method. I modified the signature of the method as well as its name, and attached a javadoc on top of it.
| public boolean include(int thatInputIdentifier, int thatAttemptNumber) { | ||
| return | ||
| super.getInputIdentifier() <= thatInputIdentifier && thatInputIdentifier < (super.getInputIdentifier() + inputIdentifierCount) && |
There was a problem hiding this comment.
can you reuse e.g. guava's Range for better readability?
https://www.geeksforgeeks.org/range-class-guava-java/
There was a problem hiding this comment.
Sure, we can. Modified to use guava's Range.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| // Avoid adding attempts which have been marked as OBSOLETE | ||
| if (isObsoleteInputAttemptIdentifier(input)) { | ||
| LOG.info("Skipping obsolete input: " + input); |
There was a problem hiding this comment.
the original behavior didn't log when we skip an obsolete input, is this an intentional change?
I can see that we still don't log anything in ShuffleScheduler when the same happens, so this is more like a LOG.debug, or back to
if (alreadyCompleted || isObsoleteInputAttemptIdentifier(input)) {
which one do you prefer?
There was a problem hiding this comment.
I think it would be better to synchronize the behaviour of ShuffleManager and ShuffleScheduler. Modified to use a single if clause.
abstractdog
commented
Dec 21, 2024
thanks a lot for this patch @ngsg, sorry that we forgot about that |
ngsg
commented
Dec 23, 2024
@abstractdog , Thank you for your review. I’ve updated the patch to address your comments. Could you please review the changes? Thank you. |
tez-yetus
commented
Dec 23, 2024
💔 -1 overall
This message was automatically generated. |
thanks @ngsg for addressing the comments! I believe this is quite close to be merged |
ngsg
commented
Dec 25, 2024
@abstractdog , I've added a unit test that checks the boundary of the range inside |
tez-yetus
commented
Dec 25, 2024
🎊 +1 overall
This message was automatically generated. |
https://issues.apache.org/jira/browse/TEZ-4061