This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Retry failed PVF execution (AmbiguousWorkerDeath) #6235
Retry failed PVF execution (AmbiguousWorkerDeath) #6235
Changes from 1 commit
2e39830
2e91ff3
e2a15ee
e477572
705adc7
6e7f57a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
params
in their encoded form may be used twice so probably it would be better to encode them once into a variable and use it twice, rather than encoding them twice? I mean cloning the already encoded form is cheaper than encoding the source two times.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given there's a 1 second delay, IMO this won't make a difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. I thought about this, but I expect the retry case to be pretty rare. I would prefer to call
encode()
a second time in the retry case, rather than unconditionallyclone()
and make an extra heap allocation in every case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this fn look like a good candidate for inclusion into
ValidationHost
implementation (not intoValidationBackend
trait though)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
ValidationHost
? I think I agree with Chris that it should be inValidationBackend
asValidationHost
already hasexecute_pvf
. However, we need to do some extra stuff around callingexecute_pvf
, so we still needvalidate_candidate
in theValidationBackend
trait.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to keep this code in
validate_candidate
(don't touch it basically) and introduce a new method toValidationBackend
traitAnd give it a default implementation (the one you already have) which calls
validate_candidate
This would make a code easily testable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, except without the
can_retry
parameter as I didn't see a need for it. It would make the code more general but isn't it unnecessary abstraction?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever you prefer, it was an insignificant suggestion :)