yanglimingcn commented on code in PR #2610:
URL: https://github.com/apache/brpc/pull/2610#discussion_r1585752728


##########
src/brpc/span.cpp:
##########
@@ -506,6 +509,12 @@ inline uint64_t ToLittleEndian(const uint32_t* buf) {
 }
 
 SpanDB* SpanDB::Open() {
+    // Remove old rpcz directory even if crash occurs.
+    if (!FLAGS_rpcz_keep_span_db) {
+        std::string cmd = butil::string_printf("rm -rf %s", 
FLAGS_rpcz_database_dir.c_str());

Review Comment:
   
目前改成了增则表达式的方式。也可以改成,比如:FLAGS_rpcz_database_dir的配置为./rpc_data,在创建的时候bRPC在后边加上rpcz,实际目录就是
 “./rpc_data/rpcz”。这样不管用户怎么配置,bRPC都加上了rpcz的目录,删除的时候就没有问题了。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to