You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "gavinchou (via GitHub)" <gi...@apache.org> on 2024/07/29 03:04:23 UTC
Re: [PR] [opt](persist) do not persist variable with default value [doris]
gavinchou commented on code in PR #36728:
URL: https://github.com/apache/doris/pull/36728#discussion_r1694453088
##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -3432,6 +3434,11 @@ public JSONObject toJson() throws IOException {
if (attr == null) {
continue;
}
+ String defaultValue = VariableMgr.getDefaultValue(attr.name());
+ String currentValue = VariableMgr.getValue(this, new VariableExpr(attr.name(), SetType.SESSION));
+ if (defaultValue != null && defaultValue.equals(currentValue)) {
Review Comment:
If a user explicitly sets a value and it equals the default value, will it not be persisted? Then after an upgrade, if the default value changes, will the user's set value be 'changed' to the new one?
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org