imay commented on a change in pull request #777: Optimize path gc
URL: https://github.com/apache/incubator-doris/pull/777#discussion_r268100100
##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -606,8 +605,8 @@ bool
TabletManager::get_tablet_id_and_schema_hash_from_path(const std::string& p
for (auto data_dir : data_dirs) {
const std::string& data_dir_path = data_dir->path();
if (path.find(data_dir_path) != std::string::npos) {
- std::string pattern = data_dir_path + "/data/\\d+/(\\d+)/?(\\d+)?";
- std::regex rgx (pattern.c_str());
+ static std::string pattern = data_dir_path +
"/data/\\d+/(\\d+)/?(\\d+)?";
Review comment:
you can't use `static` here, it would lead a bug
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]