You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "chenBright (via GitHub)" <gi...@apache.org> on 2024/04/29 15:12:03 UTC
[PR] Restrict BRPC_VALIDATE_GFLAG to global scope and namespace scope only (brpc)
chenBright opened a new pull request, #2625:
URL: https://github.com/apache/brpc/pull/2625
### What problem does this PR solve?
Issue Number:
Problem Summary:
### What is changed and the side effects?
Changed:
限制BRPC_VALIDATE_GFLAG只能在全局作用域或者namespace中使用,避免注册失败导致运行中的进程退出了。
Side effects:
- Performance effects(性能影响):
- Breaking backward compatibility(向后兼容性):
---
### Check List:
- Please make sure your changes are compilable(请确保你的更改可以通过编译).
- When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
- Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Restrict BRPC_VALIDATE_GFLAG to global scope and namespace scope only (brpc)
Posted by "yanglimingcn (via GitHub)" <gi...@apache.org>.
yanglimingcn commented on PR #2625:
URL: https://github.com/apache/brpc/pull/2625#issuecomment-2098199797
有时候希望gflags的validator在第一次加载的时候不执行validator,因为validator里面的一些内容需要在程序起来后才能有效。
这个PR对这种情况如何处理呢?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Restrict BRPC_VALIDATE_GFLAG to global scope and namespace scope only (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm merged PR #2625:
URL: https://github.com/apache/brpc/pull/2625
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Restrict BRPC_VALIDATE_GFLAG to global scope and namespace scope only (brpc)
Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #2625:
URL: https://github.com/apache/brpc/pull/2625#issuecomment-2098344738
https://github.com/apache/brpc/blob/7a8df4640f6d222ebfed947689ba38004c8552d1/src/brpc/reloadable_flags.h#L27-L29
从注释能看出,BRPC_VALIDATE_GFLAG的设计的初衷就是期望只在全局作用域调的。
如果需要在程序起来后起作用的话,自己调GFLAGS_NS::RegisterFlagValidator来注册回调函数就行了吧。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org