This is an automated email from the ASF dual-hosted git repository.

jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 87552c13 add warning for rdma invoke when brpc is not compiled with 
rdma
     new b8a40a70 Merge pull request #1967 from Tuvie/master
87552c13 is described below

commit 87552c1391c61371eaa1505676a6913d1c8aebb4
Author: Tuvie <lizhaogeng1...@gmail.com>
AuthorDate: Wed Oct 26 22:08:20 2022 +0800

    add warning for rdma invoke when brpc is not compiled with rdma
---
 src/brpc/rdma/rdma_helper.cpp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/brpc/rdma/rdma_helper.cpp b/src/brpc/rdma/rdma_helper.cpp
index 0c49f204..75de2e4f 100644
--- a/src/brpc/rdma/rdma_helper.cpp
+++ b/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. To enable it, please refer 
to "
+               << 
"https://github.com/apache/incubator-brpc/blob/master/docs/en/rdma.md";;
+    exit(1);
+}
+}
+}
+
+#endif  // if BRPC_WITH_RDMA


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to