Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exposing inconsistency in job status outside of persistence API #1153

Merged
merged 1 commit into from Feb 9, 2022

Conversation

tgianos
Copy link
Contributor

@tgianos tgianos commented Feb 9, 2022

Within job launch logic there was a helper method which would query the job status and based on the returned value proceed with some logic to either update it or fall back to other logic. This works ok if all requests to the persistence service implementation go to a single cosistent backend. If, however, read only queries go to a read replica which may have lag or some other implementation entirely this breaks down without the service actually knowing why or how.

Moving the logic for this behind the persistence API and letting the launch service only act the returned job status from the source of truth api should fix this problem.

Within job launch logic there was a helper method which would query the job status and based on the returned value proceed with some logic to either update it or fall back to other logic. This works ok if all requests to the persistence service implementation go to a single cosistent backend. If, however, read only queries go to a read replica which may have lag or some other implementation entirely this breaks down without the service actually knowing why or how.

Moving the logic for this behind the persistence API and letting the launch service only act the returned job status from the source of truth api should fix this problem.
@tgianos tgianos requested a review from nvhoang February 9, 2022 00:06
@tgianos tgianos self-assigned this Feb 9, 2022
@tgianos tgianos added this to the 4.2.0 milestone Feb 9, 2022
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 93.788% when pulling 556028c on tgianos:jobStatusFix into cfe9cfd on Netflix:master.

Copy link
Contributor

@nvhoang nvhoang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @tgianos !

@tgianos tgianos merged commit e78b9b9 into Netflix:master Feb 9, 2022
@tgianos tgianos deleted the jobStatusFix branch February 9, 2022 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants