This is an automated email from the ASF dual-hosted git repository. yangzhg pushed a commit to branch libhdfs3 in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
commit b4abdf452efca8311f3030dda633402dd8a8bf3e Author: yangzhg <[email protected]> AuthorDate: Mon Jun 13 13:00:30 2022 +0800 fix a bug of client uuid set error --- src/rpc/RpcClient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/RpcClient.cpp b/src/rpc/RpcClient.cpp index 0eba233..10588bf 100644 --- a/src/rpc/RpcClient.cpp +++ b/src/rpc/RpcClient.cpp @@ -26,7 +26,6 @@ #include "RpcClient.h" #include "Thread.h" -#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_generators.hpp> namespace Hdfs { @@ -47,7 +46,9 @@ RpcClient & RpcClient::getClient() { RpcClientImpl::RpcClientImpl() : cleaning(false), running(true), count(0) { - clientId = boost::uuids::to_string(boost::uuids::random_generator()()); + auto id = boost::uuids::random_generator()(); + clientId.resize(boost::uuids::uuid::static_size()); + memcpy(const_cast<char*>(clientId.data()), id.begin(), boost::uuids::uuid::static_size()); #ifdef MOCK stub = NULL; #endif --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
