Skip to content

better handle non-transient errors - #5506

Merged
timvisee merged 1 commit into
devfrom
better-handle-non-transient-errors
Nov 26, 2024
Merged

timvisee merged 1 commit into
devfrom
better-handle-non-transient-errors

Conversation

@generall

@generall generall commented Nov 22, 2024 •

Copy link
Copy Markdown
Member

During stream shard transfer in ForwardShardProxy we modify wait parameter for internal and forwarded requests.
This can lead to inconsistent responses across replicas, as wait=true/false affects when the validation of request is happening. It might be, that some replicas accept the request, while the one with shard transfer doesn't.

This inconsistency triggers the consistency resolution mechanism, which previously ignored the difference between transient and non-transient errors.

This PR makes consistency resolution more careful with non-transient errors and only deactivate the replica if there are others who completely applied update operation

@generall
generall requested a review from ffuugoo November 22, 2024 12:32
Comment on lines +366 to +367
// If there is at least one full-complete operation, we can't ignore non-transient errors (4xx)
// And we must deactivate failed replicas to ensure consistency

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't fully understand why this is the case.

Isn't exactly the same true for all acknowledged updates, because we can assume they'll be applied (eventually) as well?

Could you provide an example which was problematic and has improved now, and potentially a counter example on why it isn't necessary for just acknowledged updates?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

image

// We always have to wait for the result of the update, cause after we release the lock,

@ffuugoo ffuugoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still don't like it and feel like there should be a better way to handle this, but I did not figure it out yet, so I propose we merge it and see how it works, and I'll try to revisit it later. 😔

@timvisee
timvisee merged commit a7d9e82 into dev Nov 26, 2024
@timvisee
timvisee deleted the better-handle-non-transient-errors branch November 26, 2024 10:53
timvisee pushed a commit that referenced this pull request Dec 9, 2024
@timvisee timvisee mentioned this pull request Dec 9, 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