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

Handle errors when registering new queue readers #4055

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Mar 15, 2023

What changed?

  • Handle errors when registering new queue readers
  • Some refactoring in queue monitor & mitigator & action to trigger back pressure when registering error happens.

Why?

  • Error handling

How did you test it?

  • Add unit test

Potential risks

  • N/A, those code path should never be executed.

Is hotfix candidate?

  • No

@yycptt yycptt requested a review from yiminc March 15, 2023 01:10
@yycptt yycptt requested a review from a team as a code owner March 15, 2023 01:10
Copy link
Member

@yiminc yiminc left a comment

Choose a reason for hiding this comment

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

Do we have test coverage targeting to every possible alert types we defined and observe the action taken that mitigate the problem?

if !ok {
// this should never happen, we already ensured all readers are created.
// we have no choice but to put those slices back
reader.MergeSlices(splitSlices...)
Copy link
Member

Choose a reason for hiding this comment

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

write some noticeable logs, or even emit metric here?

@@ -39,12 +39,13 @@ const (
clearSliceThrottleDuration = 10 * time.Second
)

var _ Action = (*actionQueuePendingTask)(nil)
Copy link
Member

Choose a reason for hiding this comment

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

please add comment to explain what this action is about, what alert is it react to, and how does it mitigate the alert.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I will send follow up PRs to comment and add tests for those actions.

@yycptt yycptt merged commit 0cf0365 into temporalio:master Apr 18, 2023
@yycptt yycptt deleted the handle-new-reader-error branch April 18, 2023 00:17
samanbarghi pushed a commit to samanbarghi/temporal that referenced this pull request May 2, 2023
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.

2 participants