You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/10/26 14:15:03 UTC
[GitHub] [incubator-brpc] Tuvie opened a new pull request, #1967: add warning for rdma invoke when brpc is not compiled with rdma
Tuvie opened a new pull request, #1967:
URL: https://github.com/apache/incubator-brpc/pull/1967
### What problem does this PR solve?
Issue Number: 1966
Problem Summary:
When brpc is not compiled with rdma, a binary may not be linked correctly if the application invoke it.
### What is changed and the side effects?
Changed:
Add warning and force exit in GlobalRdmaInitializeOrDie if BRPC_WITH_RDMA is not defined.
Side effects:
- Performance effects(性能影响): None
- Breaking backward compatibility(向后兼容性): None
---
### 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](../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
[GitHub] [incubator-brpc] zyearn merged pull request #1967: add warning for rdma invoke when brpc is not compiled with rdma
Posted by GitBox <gi...@apache.org>.
zyearn merged PR #1967:
URL: https://github.com/apache/incubator-brpc/pull/1967
--
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
[GitHub] [incubator-brpc] Tuvie commented on a diff in pull request #1967: add warning for rdma invoke when brpc is not compiled with rdma
Posted by GitBox <gi...@apache.org>.
Tuvie commented on code in PR #1967:
URL: https://github.com/apache/incubator-brpc/pull/1967#discussion_r1006397471
##########
src/brpc/rdma/rdma_helper.cpp:
##########
@@ -633,4 +633,19 @@ bool SupportedByRdma(std::string protocol) {
} // namespace rdma
} // namespace brpc
-#endif // if BRPC_WITH_RDMA
\ No newline at end of file
+#else
+
+#include <stdlib.h>
+#include "butil/logging.h"
+
+namespace brpc {
+namespace rdma {
+void GlobalRdmaInitializeOrDie() {
+ LOG(ERROR) << "brpc is not compiled with rdma. "
+ << "Please refer to doc/en/rdma.md to enable it.";
Review Comment:
可以,我加一下
--
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
[GitHub] [incubator-brpc] zyearn commented on a diff in pull request #1967: add warning for rdma invoke when brpc is not compiled with rdma
Posted by GitBox <gi...@apache.org>.
zyearn commented on code in PR #1967:
URL: https://github.com/apache/incubator-brpc/pull/1967#discussion_r1006103478
##########
src/brpc/rdma/rdma_helper.cpp:
##########
@@ -633,4 +633,19 @@ bool SupportedByRdma(std::string protocol) {
} // namespace rdma
} // namespace brpc
-#endif // if BRPC_WITH_RDMA
\ No newline at end of file
+#else
+
+#include <stdlib.h>
+#include "butil/logging.h"
+
+namespace brpc {
+namespace rdma {
+void GlobalRdmaInitializeOrDie() {
+ LOG(ERROR) << "brpc is not compiled with rdma. "
+ << "Please refer to doc/en/rdma.md to enable it.";
Review Comment:
这里需要贴上github的full path方便用户直接点开吗?
--
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