Repository navigation
Fixes #4356: Modify order of protocol upgrade detection. - #4357
Merged
Merged
Conversation
we detected that during cycles between celery 3.1.25 and celery 4.1.0 workers, a message returning from a celery 4.1.0 worker crashes 3.1.25 workers with an unrecoverable error due to "hybrid" messages.
This was referenced Nov 1, 2017
Contributor
|
I'll need to release a new 3.x version. |
Member
|
@thedrow do if possible |
Contributor
|
Will do with the release of 4.2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
If a task is executed under Celery 3.1.25, and is retried under Celery 4 node, and then retried again under a Celery 3.1.25 node, the Celery 3.1.25 node will crash, resulting in message loss.
When the Celery 3.1.25 task is executed on a Celery 4, the task message is upgraded to Protocol 2. However, the upgrade results in a hybrid message that complies with both formats, and when the task fails and is retried on the Celery 3.1.25 worker, the "hybrid" message is mis-identified as a Protocol 1
By changing the detection order, the "hybrid" is correctly identified as being Protocol 2 compliant.
Unfortunately, this change must be made against the 3.1 branch, as the error lies in the "forward-compatibility" code introduced in that version.