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: get ngx_array_t element number error #198

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix: get ngx_array_t element number error #198

wants to merge 2 commits into from

Conversation

seven-eleven
Copy link
Contributor

No description provided.

ngx_http_upsync_server_t *upsync_server;

ngx_pool_t *pool; // worker common pool, can't be destroyed
Copy link
Member

Choose a reason for hiding this comment

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

更换为pool 的优点呢?有没有一种极端的情况,内存一直被吞噬(在增删server 比较频繁的场景下),pool 内存释放是以块为单位?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

删除向pool释放的内存,还能被使用,减少向系统申请、释放内存数。
没打算提交pool的修改,因为通过首次upstream有增删控制,去replace_peers已经很好了。
主要是修复bug:
image

我把这个删了,再提交一个PR。

Copy link
Member

Choose a reason for hiding this comment

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

欢迎任何可能的修改哈,探讨选取最优的;还有很多待优化的地方 :-);
@seven-eleven 谢谢

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