-
Notifications
You must be signed in to change notification settings - Fork 69
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: memberlist delete operation #644
base: main
Are you sure you want to change the base?
Conversation
3352299
to
a3ad9d2
Compare
a3ad9d2
to
7e6d3bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change makes sense, but it definitely needs unit tests. If you can even cover cases which haven't been covered so far, that'd be great
@@ -1695,19 +1702,3 @@ func updateTimeMillis(ts time.Time) int64 { | |||
} | |||
return ts.UnixMilli() | |||
} | |||
|
|||
func handlePossibleNilEncode(codec codec.Codec, change Mergeable) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided that the handle*
funcions are not needed since we handle the change=nil at the mergeValueForKey
level. That was the main reason these were needed at the first place. I validated that the []byte{}
was the one causing the Error failed to decode value: snappy: corrupt input
at the first place. Please let me know what you think
Update after the test in mimir-dev-11
Bad news
|
What this PR does:
After the rollout of delete operation in memberlist we observed 2 things:
failed to decode value: snappy: corrupt input
. (logs)In this PR we tackle these two issues by:
change
when the only thing that gets updated is the Delete status, so we do not have tohandlePossibleNilEncode
which was returning an []byte{} that was causing the Decode issue.Verified it locally.
Tests
checkMemberlistEntry
, that will constantly checks the memberlist entries up to specific amount of time before considers the test failure. It utilizes test.pollTestDelete
to check if there are any encoding errors during the Delete flow. Coversfailed to decode value: snappy: corrupt input
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]