Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix update config #4915

Merged
merged 2 commits into from
Nov 23, 2022
Merged

Conversation

cangfengzhs
Copy link
Contributor

@cangfengzhs cangfengzhs commented Nov 22, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

UPDATE CONFIGS statement will lead to storage crash when update rocksdb configs.

Issue(s) number:

Description:

In the test test_configs, we will try to modify the value of storage:rocksdb_column_family_options. And we save the value as an Expression after parser. In this case, it's a Map.

Then, gflags only accepts string type value. We transfer the Value::Map to map<std::string,std::string>. But we add extra quotes. For example, a:1 while be transferred to "a":"1", but b:"x" will be transferred to "b":""x"", which is error format for json.

But I still don't know why this problem is not triggered in our CI.

A preliminary guess is that the update of config will wait for the metaClient to pull regularly. The interval between two modifications is too short, so the metaClient does not find this modification.

        if (it == metaConfigMap_.end() ||
            metaConfigMap[key].get_value() != it->second.get_value()) {
          updateGflagsValue(entry.second);               // not invoke
          metaConfigMap_[key] = entry.second;
        }

How do you solve it?

I modified the value written in restore, so that the 'test_configs' case will not report an error, but the subsequent case will fail when creating a space. It can only be regarded as a temporary solution.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@cangfengzhs cangfengzhs requested review from yixinglu, Shylock-Hg, pengweisong and critical27 and removed request for yixinglu November 22, 2022 11:19
@cangfengzhs cangfengzhs added the ready-for-testing PR: ready for the CI test label Nov 22, 2022
@cangfengzhs cangfengzhs mentioned this pull request Nov 22, 2022
11 tasks
@critical27 critical27 merged commit 2c447a9 into vesoft-inc:master Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants