fix: ignore update messages from itself#23
Merged
hsluoyz merged 2 commits intoapache:masterfrom Dec 1, 2022
Merged
Conversation
|
@tangyang9464 @JalinWang @imp2002 please review |
Contributor
Author
|
oh why the coverage is decreased to 0.0%? I saw the coverage result from CI (Go/test (1.16)) is 85.4% |
Member
|
@imp2002 plz review |
Contributor
Author
|
Can someone review this PR? @hsluoyz @JalinWang @imp2002 |
Contributor
Author
I don't know why the coverage from |
hsluoyz
requested changes
Dec 1, 2022
|
LGTM |
hsluoyz
approved these changes
Dec 1, 2022
|
🎉 This PR is included in version 2.1.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Fix: #22
When policy changes, etcd-watcher will
Puta message into etcd, then the revision of key will be updated.At the same time, etcd-watcher will get this new revision because it is watching this key.
So in last pr #22 , to prevent consuming the messages put by self, every time etcd-watcher put a message, it will record the revision from the
Putresponse. And in the goroutine forWatch, it will verify the revision of received message is bigger than recorded one or not.But in the
Updatefunction, it only update local recorded revision whenPutfails, it means this feature will be never triggered.