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

Fix the issue: multi kong woker processes will premature trigger other woker processes's event callback #18

Merged
merged 2 commits into from
Apr 4, 2019
Merged

Conversation

wuguangkuo
Copy link
Contributor

@wuguangkuo wuguangkuo commented Apr 2, 2019

Fix the issue: When restart kong process, the concurrent worker processes load targets, and premature trigger other workers's event callback, and result in the event_handler method error at line 925: the targets is nil when index it's ip field. The issue I commited at "Kong" project: Kong/kong#4453

…sses load targets, and trigger other workers's event callback, and result in the event_handler method error at line 925: the targets is nil when index it's ip field.
@wuguangkuo
Copy link
Contributor Author

@hishamhm Hi, could you deal this pull request?

Copy link
Contributor

@hishamhm hishamhm left a comment

Choose a reason for hiding this comment

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

Looks good — minor indentation fix to be made before merge

@@ -1295,6 +1289,12 @@ function _M.new(opts)
if not ok then
self:log(ERR, "Error loading initial target list: ", err)
end

self.ev_callback = function(data, event)
Copy link
Contributor

Choose a reason for hiding this comment

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

please fix the indentation on this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@hishamhm
Copy link
Contributor

hishamhm commented Apr 3, 2019

@wuguangkuo Thanks for the patch! does this change alone fix the Kong issue?

@wuguangkuo
Copy link
Contributor Author

wuguangkuo commented Apr 4, 2019

@wuguangkuo Thanks for the patch! does this change alone fix the Kong issue?

Yes, the error log was not appeared after this modification.

@hishamhm hishamhm merged commit f091fbf into Kong:master Apr 4, 2019
@hishamhm
Copy link
Contributor

hishamhm commented Apr 4, 2019

@wuguangkuo Merged, thank you!

@hishamhm
Copy link
Contributor

hishamhm commented Apr 4, 2019

I will push a patch release shortly.

@wuguangkuo wuguangkuo deleted the fix-target-load-issue branch April 8, 2019 01:16
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.

None yet

2 participants