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: pipeline pausing race conditions of draining and terminating source #2131

Merged
merged 9 commits into from
Oct 9, 2024

Conversation

kohlisid
Copy link
Contributor

@kohlisid kohlisid commented Oct 8, 2024

Explain what this PR does.

Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid changed the title P fix chore: add check conditions for pause Oct 8, 2024
@juliev0
Copy link
Contributor

juliev0 commented Oct 8, 2024

I'm curious - are you able to explain now what could've caused pl.Status.Phase to be set to "Paused" here but not reflected in etcd Pipeline Status?

@kohlisid
Copy link
Contributor Author

kohlisid commented Oct 8, 2024

From the logs I captured, I was able to see the status getting reflected to Paused in memory for sure. In the next reconciliation process (which begins almost immediately) that got triggered we started from running again and due to a race we stay in pausing as we are not able to drain out the buffers.

@juliev0
Copy link
Contributor

juliev0 commented Oct 8, 2024

From the logs I captured, I was able to see the status getting reflected to Paused in memory for sure. In the next reconciliation process (which begins almost immediately) that got triggered we started from running again and due to a race we stay in pausing as we are not able to drain out the buffers.

That's interesting but I still don't understand what would cause the write to etcd not to occur (unless it is writing and the watch is skipping changes).

pkg/reconciler/pipeline/controller.go Outdated Show resolved Hide resolved
pkg/reconciler/pipeline/controller.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 27.77778% with 26 lines in your changes missing coverage. Please review.

Project coverage is 64.06%. Comparing base (d340a4e) to head (b8b55bf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/pipeline/controller.go 27.77% 24 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2131      +/-   ##
==========================================
- Coverage   64.10%   64.06%   -0.04%     
==========================================
  Files         325      325              
  Lines       31558    31574      +16     
==========================================
- Hits        20229    20227       -2     
- Misses      10277    10295      +18     
  Partials     1052     1052              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid requested review from whynowy and juliev0 October 8, 2024 22:14
@juliev0
Copy link
Contributor

juliev0 commented Oct 9, 2024

LGTM as far as I can tell

Copy link
Member

@whynowy whynowy left a comment

Choose a reason for hiding this comment

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

The logic change looks good to me, it would be better to have more appropriate variable and function names.

pkg/reconciler/pipeline/controller.go Outdated Show resolved Hide resolved
pkg/reconciler/pipeline/controller.go Outdated Show resolved Hide resolved
@kohlisid kohlisid marked this pull request as ready for review October 9, 2024 16:18
@kohlisid kohlisid requested a review from vigith as a code owner October 9, 2024 16:18
@kohlisid kohlisid requested a review from whynowy October 9, 2024 16:18
@whynowy whynowy changed the title chore: add check conditions for pause fix: pipeline pausing race conditions of terminating source pods and draining Oct 9, 2024
@whynowy whynowy changed the title fix: pipeline pausing race conditions of terminating source pods and draining fix: pipeline pausing race conditions of draining and terminating source Oct 9, 2024
@kohlisid kohlisid enabled auto-merge (squash) October 9, 2024 18:09
@kohlisid kohlisid merged commit 206ff7f into numaproj:main Oct 9, 2024
24 checks passed
@kohlisid kohlisid deleted the p-fix branch October 9, 2024 18:46
whynowy pushed a commit that referenced this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants