morningman commented on code in PR #15830:
URL: https://github.com/apache/doris/pull/15830#discussion_r1081425461
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -603,6 +617,14 @@ public void readFields(DataInput in) throws IOException {
if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_105) {
dbProperties = DatabaseProperty.read(in);
+ String txnQuotaStr =
dbProperties.getOrDefault("transactionQuotaSize", (transactionQuotaSize == -1L)
Review Comment:
I think the logic should be:
```
String txnQuotaStr = dbProperties.getOrDefault("transactionQuotaSize",
String.valueOf(Config.max_running_txn_num_per_db));
```
Because if `transactionQuotaSize` does not exist, than we should use the
origin `Config.max_running_txn_num_per_db`.
And once `transactionQuotaSize` is set, next time, we can get
`transactionQuotaSize` from `dbProperties` directly.
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -556,6 +569,7 @@ public void write(DataOutput out) throws IOException {
dbEncryptKey.write(out);
out.writeLong(replicaQuotaSize);
+ dbProperties.put("transactionQuotaSize",
String.valueOf(transactionQuotaSize));
Review Comment:
define a `static final string` for "transactionQuotaSize" key
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]