This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 854b4b1b47 [fix](storage-policy) fix bug that missing field when
refreshing storage policy (#11580)
854b4b1b47 is described below
commit 854b4b1b4768f6a60b749b2a16a40caf1b82b127
Author: Mingyu Chen <[email protected]>
AuthorDate: Fri Aug 12 20:11:54 2022 +0800
[fix](storage-policy) fix bug that missing field when refreshing storage
policy (#11580)
1. Change all required fields to optional
Although they all "required", but it not recommended to use `required`,
because it is hard to modify in future.
2. Fix a missing field bug
---
.../main/java/org/apache/doris/policy/StoragePolicy.java | 1 -
.../java/org/apache/doris/service/FrontendServiceImpl.java | 2 +-
gensrc/thrift/AgentService.thrift | 14 +++++++-------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/policy/StoragePolicy.java
b/fe/fe-core/src/main/java/org/apache/doris/policy/StoragePolicy.java
index 89f899ef2b..1200745c52 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/policy/StoragePolicy.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/policy/StoragePolicy.java
@@ -373,7 +373,6 @@ public class StoragePolicy extends Policy {
storageResource = alterStorageResource;
}
-
md5Checksum = calcPropertiesMd5();
notifyUpdate();
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 4625cc2b7d..c66e2279e0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -1046,7 +1046,7 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
result.addToResultEntrys(rEntry);
}
);
- if (policyList.size() == 0) {
+ if (!result.isSetResultEntrys()) {
result.setResultEntrys(new ArrayList<>());
}
diff --git a/gensrc/thrift/AgentService.thrift
b/gensrc/thrift/AgentService.thrift
index 913b8aad96..156b3e70a7 100644
--- a/gensrc/thrift/AgentService.thrift
+++ b/gensrc/thrift/AgentService.thrift
@@ -67,16 +67,16 @@ struct TS3StorageParam {
}
struct TGetStoragePolicy {
- 1: required string policy_name
- 2: required i64 cooldown_datetime
- 3: required i64 cooldown_ttl
- 4: required TS3StorageParam s3_storage_param
- 5: required string md5_checksum
+ 1: optional string policy_name
+ 2: optional i64 cooldown_datetime
+ 3: optional i64 cooldown_ttl
+ 4: optional TS3StorageParam s3_storage_param
+ 5: optional string md5_checksum
}
struct TGetStoragePolicyResult {
- 1: required Status.TStatus status
- 2: required list<TGetStoragePolicy> result_entrys
+ 1: optional Status.TStatus status
+ 2: optional list<TGetStoragePolicy> result_entrys
}
enum TCompressionType {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]