You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ww...@apache.org on 2022/12/27 02:26:48 UTC
[incubator-brpc] branch master updated: delete deprecated logoff_ms gflag in example folder (#2064)
This is an automated email from the ASF dual-hosted git repository.
wwbmmm 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 6ebe2e98 delete deprecated logoff_ms gflag in example folder (#2064)
6ebe2e98 is described below
commit 6ebe2e98f25619aa69e497923ec13f2c0bee7195
Author: Ran Miller <ra...@gmail.com>
AuthorDate: Tue Dec 27 10:26:37 2022 +0800
delete deprecated logoff_ms gflag in example folder (#2064)
---
example/asynchronous_echo_c++/server.cpp | 2 --
example/auto_concurrency_limiter/server.cpp | 2 --
example/backup_request_c++/server.cpp | 2 --
example/cancel_c++/server.cpp | 2 --
example/dynamic_partition_echo_c++/server.cpp | 8 ++------
example/echo_c++/server.cpp | 2 --
example/grpc_c++/server.cpp | 2 --
example/http_c++/http_server.cpp | 2 --
example/multi_threaded_echo_c++/server.cpp | 2 --
example/multi_threaded_echo_fns_c++/server.cpp | 8 ++------
example/parallel_echo_c++/server.cpp | 2 --
example/partition_echo_c++/server.cpp | 8 ++------
example/selective_echo_c++/server.cpp | 8 ++------
example/session_data_and_thread_local/server.cpp | 2 --
example/streaming_echo_c++/server.cpp | 2 --
15 files changed, 8 insertions(+), 46 deletions(-)
diff --git a/example/asynchronous_echo_c++/server.cpp b/example/asynchronous_echo_c++/server.cpp
index 36bb00d4..d95d9dfe 100644
--- a/example/asynchronous_echo_c++/server.cpp
+++ b/example/asynchronous_echo_c++/server.cpp
@@ -26,8 +26,6 @@ DEFINE_bool(send_attachment, true, "Carry attachment along with response");
DEFINE_int32(port, 8003, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
// Your implementation of example::EchoService
class EchoServiceImpl : public example::EchoService {
diff --git a/example/auto_concurrency_limiter/server.cpp b/example/auto_concurrency_limiter/server.cpp
index c65be9db..5d731454 100644
--- a/example/auto_concurrency_limiter/server.cpp
+++ b/example/auto_concurrency_limiter/server.cpp
@@ -31,8 +31,6 @@
#include <fstream>
#include "cl_test.pb.h"
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(server_bthread_concurrency, 4,
"Configuring the value of bthread_concurrency, For compute max qps, ");
DEFINE_int32(server_sync_sleep_us, 2500,
diff --git a/example/backup_request_c++/server.cpp b/example/backup_request_c++/server.cpp
index de3902a4..198120f1 100644
--- a/example/backup_request_c++/server.cpp
+++ b/example/backup_request_c++/server.cpp
@@ -26,8 +26,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8000, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(sleep_ms, 20, "Sleep so many milliseconds on even-th requests");
// Your implementation of example::EchoService
diff --git a/example/cancel_c++/server.cpp b/example/cancel_c++/server.cpp
index d590ff11..5fa5e17a 100644
--- a/example/cancel_c++/server.cpp
+++ b/example/cancel_c++/server.cpp
@@ -26,8 +26,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8000, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
// Your implementation of example::EchoService
// Notice that implementing brpc::Describable grants the ability to put
diff --git a/example/dynamic_partition_echo_c++/server.cpp b/example/dynamic_partition_echo_c++/server.cpp
index 9f81f9cb..0047e01c 100644
--- a/example/dynamic_partition_echo_c++/server.cpp
+++ b/example/dynamic_partition_echo_c++/server.cpp
@@ -31,8 +31,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8004, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
DEFINE_int32(server_num, 1, "Number of servers");
DEFINE_string(sleep_us, "", "Sleep so many microseconds before responding");
@@ -162,11 +160,9 @@ int main(int argc, char* argv[]) {
}
// Don't forget to stop and join the server otherwise still-running
- // worker threads may crash your program. Clients will have/ at most
- // `FLAGS_logoff_ms' to close their connections. If some connections
- // still remains after `FLAGS_logoff_ms', they will be closed by force.
+ // worker threads may crash your program.
for (int i = 0; i < FLAGS_server_num; ++i) {
- servers[i].Stop(FLAGS_logoff_ms);
+ servers[i].Stop(0/*not used now*/);
}
for (int i = 0; i < FLAGS_server_num; ++i) {
servers[i].Join();
diff --git a/example/echo_c++/server.cpp b/example/echo_c++/server.cpp
index 9e06b4c8..08b3e9d6 100644
--- a/example/echo_c++/server.cpp
+++ b/example/echo_c++/server.cpp
@@ -28,8 +28,6 @@ DEFINE_string(listen_addr, "", "Server listen address, may be IPV4/IPV6/UDS."
" If this is set, the flag port will be ignored");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
// Your implementation of example::EchoService
// Notice that implementing brpc::Describable grants the ability to put
diff --git a/example/grpc_c++/server.cpp b/example/grpc_c++/server.cpp
index 7daaf39b..50e21dba 100644
--- a/example/grpc_c++/server.cpp
+++ b/example/grpc_c++/server.cpp
@@ -26,8 +26,6 @@
DEFINE_int32(port, 50051, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_bool(gzip, false, "compress body using gzip");
class GreeterImpl : public helloworld::Greeter {
diff --git a/example/http_c++/http_server.cpp b/example/http_c++/http_server.cpp
index eab39e27..af373ce8 100644
--- a/example/http_c++/http_server.cpp
+++ b/example/http_c++/http_server.cpp
@@ -26,8 +26,6 @@
DEFINE_int32(port, 8010, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_string(certificate, "cert.pem", "Certificate file path to enable SSL");
DEFINE_string(private_key, "key.pem", "Private key file path to enable SSL");
diff --git a/example/multi_threaded_echo_c++/server.cpp b/example/multi_threaded_echo_c++/server.cpp
index 71e62093..b747487f 100644
--- a/example/multi_threaded_echo_c++/server.cpp
+++ b/example/multi_threaded_echo_c++/server.cpp
@@ -26,8 +26,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8002, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
DEFINE_int32(internal_port, -1, "Only allow builtin services at this port");
diff --git a/example/multi_threaded_echo_fns_c++/server.cpp b/example/multi_threaded_echo_fns_c++/server.cpp
index 4c30188c..c9576e68 100644
--- a/example/multi_threaded_echo_fns_c++/server.cpp
+++ b/example/multi_threaded_echo_fns_c++/server.cpp
@@ -32,8 +32,6 @@ DEFINE_bool(send_attachment, false, "Carry attachment along with response");
DEFINE_int32(port, 8004, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
DEFINE_int32(server_num, 1, "Number of servers");
DEFINE_string(sleep_us, "", "Sleep so many microseconds before responding");
@@ -177,11 +175,9 @@ int main(int argc, char* argv[]) {
}
// Don't forget to stop and join the server otherwise still-running
- // worker threads may crash your program. Clients will have/ at most
- // `FLAGS_logoff_ms' to close their connections. If some connections
- // still remains after `FLAGS_logoff_ms', they will be closed by force.
+ // worker threads may crash your program.
for (int i = 0; i < FLAGS_server_num; ++i) {
- servers[i].Stop(FLAGS_logoff_ms);
+ servers[i].Stop(0/*not used now*/);
}
for (int i = 0; i < FLAGS_server_num; ++i) {
servers[i].Join();
diff --git a/example/parallel_echo_c++/server.cpp b/example/parallel_echo_c++/server.cpp
index 4ceba54e..364b29ed 100644
--- a/example/parallel_echo_c++/server.cpp
+++ b/example/parallel_echo_c++/server.cpp
@@ -27,8 +27,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8002, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
// Your implementation of example::EchoService
diff --git a/example/partition_echo_c++/server.cpp b/example/partition_echo_c++/server.cpp
index 32cabbb5..4c2053f8 100644
--- a/example/partition_echo_c++/server.cpp
+++ b/example/partition_echo_c++/server.cpp
@@ -31,8 +31,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8002, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
DEFINE_int32(server_num, 1, "Number of servers");
DEFINE_string(sleep_us, "", "Sleep so many microseconds before responding");
@@ -162,11 +160,9 @@ int main(int argc, char* argv[]) {
}
// Don't forget to stop and join the server otherwise still-running
- // worker threads may crash your program. Clients will have/ at most
- // `FLAGS_logoff_ms' to close their connections. If some connections
- // still remains after `FLAGS_logoff_ms', they will be closed by force.
+ // worker threads may crash your program.
for (int i = 0; i < FLAGS_server_num; ++i) {
- servers[i].Stop(FLAGS_logoff_ms);
+ servers[i].Stop(0/*not used now*/);
}
for (int i = 0; i < FLAGS_server_num; ++i) {
servers[i].Join();
diff --git a/example/selective_echo_c++/server.cpp b/example/selective_echo_c++/server.cpp
index 53736ec9..cd075ac7 100644
--- a/example/selective_echo_c++/server.cpp
+++ b/example/selective_echo_c++/server.cpp
@@ -30,8 +30,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8114, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
DEFINE_int32(server_num, 7, "Number of servers");
DEFINE_string(sleep_us, "", "Sleep so many microseconds before responding");
@@ -161,11 +159,9 @@ int main(int argc, char* argv[]) {
}
// Don't forget to stop and join the server otherwise still-running
- // worker threads may crash your program. Clients will have/ at most
- // `FLAGS_logoff_ms' to close their connections. If some connections
- // still remains after `FLAGS_logoff_ms', they will be closed by force.
+ // worker threads may crash your program.
for (int i = 0; i < FLAGS_server_num; ++i) {
- servers[i].Stop(FLAGS_logoff_ms);
+ servers[i].Stop(0/*not used now*/);
}
for (int i = 0; i < FLAGS_server_num; ++i) {
servers[i].Join();
diff --git a/example/session_data_and_thread_local/server.cpp b/example/session_data_and_thread_local/server.cpp
index ae585cc7..5d5efc1c 100644
--- a/example/session_data_and_thread_local/server.cpp
+++ b/example/session_data_and_thread_local/server.cpp
@@ -26,8 +26,6 @@ DEFINE_bool(echo_attachment, true, "Echo attachment as well");
DEFINE_int32(port, 8002, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
DEFINE_int32(max_concurrency, 0, "Limit of request processing in parallel");
butil::atomic<int> nsd(0);
diff --git a/example/streaming_echo_c++/server.cpp b/example/streaming_echo_c++/server.cpp
index 3460d5f1..072105c7 100644
--- a/example/streaming_echo_c++/server.cpp
+++ b/example/streaming_echo_c++/server.cpp
@@ -27,8 +27,6 @@ DEFINE_bool(send_attachment, true, "Carry attachment along with response");
DEFINE_int32(port, 8001, "TCP Port of this server");
DEFINE_int32(idle_timeout_s, -1, "Connection will be closed if there is no "
"read/write operations during the last `idle_timeout_s'");
-DEFINE_int32(logoff_ms, 2000, "Maximum duration of server's LOGOFF state "
- "(waiting for client to close connection before server stops)");
class StreamReceiver : public brpc::StreamInputHandler {
public:
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org