You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by lo...@apache.org on 2023/10/13 14:25:57 UTC
[brpc] branch release-1.6 updated (d2b73ec9 -> e46c8265)
This is an automated email from the ASF dual-hosted git repository.
lorinlee pushed a change to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/brpc.git
from d2b73ec9 Update version to 1.6.0
new 39804c31 Escape span method name (#2411)
new e46c8265 Update version to 1.6.0
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CMakeLists.txt | 2 +-
RELEASE_VERSION | 2 +-
package/rpm/brpc.spec | 2 +-
src/brpc/builtin/rpcz_service.cpp | 10 +++++-----
src/brpc/controller.cpp | 6 ++++++
src/brpc/controller.h | 1 +
6 files changed, 15 insertions(+), 8 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[brpc] 01/02: Escape span method name (#2411)
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lorinlee pushed a commit to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/brpc.git
commit 39804c311f06880f02ffc285ddeb8b533cc68a68
Author: Weibing Wang <ww...@163.com>
AuthorDate: Thu Oct 12 20:15:53 2023 +0800
Escape span method name (#2411)
* Escape span method name
* Reuse WebEscape
---
src/brpc/builtin/rpcz_service.cpp | 10 +++++-----
src/brpc/controller.cpp | 6 ++++++
src/brpc/controller.h | 1 +
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/brpc/builtin/rpcz_service.cpp b/src/brpc/builtin/rpcz_service.cpp
index d4374e47..3625c068 100644
--- a/src/brpc/builtin/rpcz_service.cpp
+++ b/src/brpc/builtin/rpcz_service.cpp
@@ -194,7 +194,7 @@ static void PrintAnnotations(
while (extractors[i]->PopAnnotation(cur_time, &anno_time, &a)) {
PrintRealTime(os, anno_time);
PrintElapse(os, anno_time, last_time);
- os << ' ' << a;
+ os << ' ' << WebEscape(a);
if (a.empty() || butil::back_char(a) != '\n') {
os << '\n';
}
@@ -249,7 +249,7 @@ static void PrintClientSpan(
if (abs_remote_side.ip == loopback_ip) {
abs_remote_side.ip = butil::my_ip();
}
- os << " Requesting " << span.full_method_name() << '@' << remote_side
+ os << " Requesting " << WebEscape(span.full_method_name()) << '@' << remote_side
<< ' ' << protocol_name << ' ' << LOG_ID_STR << '=';
if (FLAGS_rpcz_hex_log_id) {
os << Hex(span.log_id());
@@ -346,7 +346,7 @@ static void PrintServerSpan(std::ostream& os, const RpczSpan& span,
os, span.start_callback_real_us(),
&last_time, extr, ARRAY_SIZE(extr))) {
entered_user_method = true;
- os << " Enter " << span.full_method_name() << std::endl;
+ os << " Enter " << WebEscape(span.full_method_name()) << std::endl;
}
const int nclient = span.client_spans_size();
@@ -359,7 +359,7 @@ static void PrintServerSpan(std::ostream& os, const RpczSpan& span,
os, span.start_send_real_us(),
&last_time, extr, ARRAY_SIZE(extr))) {
if (entered_user_method) {
- os << " Leave " << span.full_method_name() << std::endl;
+ os << " Leave " << WebEscape(span.full_method_name()) << std::endl;
} else {
os << " Responding" << std::endl;
}
@@ -665,7 +665,7 @@ void RpczService::default_method(::google::protobuf::RpcController* cntl_base,
} else {
os << span.log_id();
}
- os << ' ' << span.full_method_name() << '(' << span.request_size()
+ os << ' ' << WebEscape(span.full_method_name()) << '(' << span.request_size()
<< ")=" << span.response_size();
if (span.error_code() == 0) {
diff --git a/src/brpc/controller.cpp b/src/brpc/controller.cpp
index 338ad66c..7ff0d26a 100644
--- a/src/brpc/controller.cpp
+++ b/src/brpc/controller.cpp
@@ -1391,6 +1391,12 @@ void WebEscape(const std::string& source, std::string* output) {
}
}
+std::string WebEscape(const std::string& source) {
+ std::string output;
+ WebEscape(source, &output);
+ return output;
+}
+
void Controller::reset_sampled_request(SampledRequest* req) {
delete _sampled_request;
_sampled_request = req;
diff --git a/src/brpc/controller.h b/src/brpc/controller.h
index f27dd54f..82988269 100644
--- a/src/brpc/controller.h
+++ b/src/brpc/controller.h
@@ -844,6 +844,7 @@ google::protobuf::Closure* DoNothing();
// Convert non-web symbols to web equivalence.
void WebEscape(const std::string& source, std::string* output);
+std::string WebEscape(const std::string& source);
// True if Ctrl-C is ever pressed.
bool IsAskedToQuit();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
[brpc] 02/02: Update version to 1.6.0
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lorinlee pushed a commit to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/brpc.git
commit e46c82655d40760b6c65710dcfea67da0095e6f0
Author: lei.li <le...@clickzetta.com>
AuthorDate: Fri Oct 13 22:25:15 2023 +0800
Update version to 1.6.0
---
CMakeLists.txt | 2 +-
RELEASE_VERSION | 2 +-
package/rpm/brpc.spec | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d150ea3..f364cd13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,7 +34,7 @@ if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
-set(BRPC_VERSION 1.6.0)
+set(BRPC_VERSION 1.6.1)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "brpc authors")
diff --git a/RELEASE_VERSION b/RELEASE_VERSION
index dc1e644a..9c6d6293 100644
--- a/RELEASE_VERSION
+++ b/RELEASE_VERSION
@@ -1 +1 @@
-1.6.0
+1.6.1
diff --git a/package/rpm/brpc.spec b/package/rpm/brpc.spec
index b9f488ca..617e2e37 100644
--- a/package/rpm/brpc.spec
+++ b/package/rpm/brpc.spec
@@ -18,7 +18,7 @@
#
Name: brpc
-Version: 1.6.0
+Version: 1.6.1
Release: 1%{?dist}
Summary: Industrial-grade RPC framework using C++ Language.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org