Skip to content

Conversation

@morningman
Copy link
Contributor

@morningman morningman commented Aug 11, 2020

Proposed changes

When setting global variables, such as set global default_rowset_type=beta,
the operation is not correctly persisted.

This CL change the fe meta version to 90.


The main reason for this problem is that for the modification of global variable,
we directly use Java's reflection mechanism to modify static member variables in GlobalVariable class.

But in the persistence method of the set operation, we only persist the value stored
in the globalSessionVariable variable, and this variable does not contain Global Variable.

So I added a new OperationType: OP_GLOBAL_VARIABLE_V2,
and added a GlobalVarPersistInfo class to record all changes.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Checklist

@morningman morningman added kind/fix Categorizes issue or PR as related to a bug. kind/meta-version-change Categorizes issue or PR as related to changing meta version labels Aug 11, 2020
@morningman morningman self-assigned this Aug 11, 2020
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Aug 17, 2020
@morningman morningman merged commit 38a2a7a into apache:master Aug 18, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Aug 21, 2020
…ed. (apache#4324)

When setting global variables, such as `set global default_rowset_type=beta`,
the operation is not correctly persisted.

This CL change the fe meta version to 90.

---------------

The main reason for this problem is that for the modification of global variable,
we directly use Java's reflection mechanism to modify static member variables in `GlobalVariable` class.

But in the persistence method of the `set` operation, we only persist the value stored
in the `globalSessionVariable` variable, and this variable does not contain Global Variable.

So I added a new OperationType: `OP_GLOBAL_VARIABLE_V2`,
and added a `GlobalVarPersistInfo` class to record all changes.
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Hastyshell added a commit to Hastyshell/doris that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug. kind/meta-version-change Categorizes issue or PR as related to changing meta version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Modification of global variables is not correctly persisted.

3 participants