This is an automated email from the ASF dual-hosted git repository.

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 4fb04891 feat(config): support retrieving configuration fields using 
glob patterns (#2592)
4fb04891 is described below

commit 4fb04891e60b363833a4930fa2768820aece0ac3
Author: sryan yuan <[email protected]>
AuthorDate: Sat Oct 12 19:20:57 2024 +0800

    feat(config): support retrieving configuration fields using glob patterns 
(#2592)
    
    Co-authored-by: yxj25245 <[email protected]>
    Co-authored-by: hulk <[email protected]>
---
 src/config/config.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/config/config.cc b/src/config/config.cc
index 1abdb913..2ced3d08 100644
--- a/src/config/config.cc
+++ b/src/config/config.cc
@@ -35,6 +35,7 @@
 #include <utility>
 #include <vector>
 
+#include "common/string_util.h"
 #include "config_type.h"
 #include "config_util.h"
 #include "parse_util.h"
@@ -867,7 +868,7 @@ Status Config::Load(const CLIOptions &opts) {
 void Config::Get(const std::string &key, std::vector<std::string> *values) 
const {
   values->clear();
   for (const auto &iter : fields_) {
-    if (key == "*" || util::ToLower(key) == iter.first) {
+    if (util::StringMatch(key, iter.first, 1)) {
       if (iter.second->IsMultiConfig()) {
         for (const auto &p : util::Split(iter.second->ToString(), "\n")) {
           values->emplace_back(iter.first);

Reply via email to