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

delete event fo moudule events would be ignored #139

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

EastMacro2020
Copy link
Collaborator

问题:当触发配置删除事件时,模块事件通知处理过程中,删除事件会由于该事件已经更新到archaius的缓存从而导致重复更新失败,最终导致该删除事件被忽略。

解决:给事件增加一个标记,标记该事件是否已经被manager更新到缓存里,如果已更新,则直接返回成功,不重复处理

@@ -123,6 +123,7 @@ type Event struct {
EventType string
Key string
Value interface{}
HasUpdated bool
Copy link
Member

Choose a reason for hiding this comment

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

该值似乎永远不会为true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

在manager.go文件的updateEvent方法的最后,会把它置为true

@tianxiaoliang tianxiaoliang merged commit 1c871db into go-chassis:master Jan 26, 2021
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