baiyangtx commented on code in PR #3811:
URL: https://github.com/apache/amoro/pull/3811#discussion_r2415902057
##########
amoro-ams/src/main/java/org/apache/amoro/server/table/DefaultTableService.java:
##########
@@ -182,6 +182,13 @@ public void initialize() {
continue;
}
List<TableRuntimeState> states =
statesMap.get(tableRuntimeMeta.getTableId());
+ // if first time states will be null can't be initial table runtime
+ if (states == null) {
+ TableRuntimeState state = new TableRuntimeState();
Review Comment:
Additionally, stateId and OptimizingStatus are not related.
TableRuntimeState represents the persistent access interface of TableRuntime,
while OptimizingStatus is part of the optimization logic of Iceberg and Mixed
Iceberg. The two are unrelated.
##########
amoro-ams/src/main/java/org/apache/amoro/server/table/DefaultTableService.java:
##########
@@ -182,6 +182,13 @@ public void initialize() {
continue;
}
List<TableRuntimeState> states =
statesMap.get(tableRuntimeMeta.getTableId());
+ // if first time states will be null can't be initial table runtime
+ if (states == null) {
+ TableRuntimeState state = new TableRuntimeState();
Review Comment:
I agree with that.
The initialization of states should be uniformly managed by the lifecycle
logic of TableRuntime, and its default values have already been defined in
StateKey.
--
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]