wangxianghu commented on a change in pull request #2260:
URL: https://github.com/apache/hudi/pull/2260#discussion_r548791159
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -129,6 +130,7 @@ public AbstractHoodieWriteClient(HoodieEngineContext
context, HoodieWriteConfig
this.metrics = new HoodieMetrics(config, config.getTableName());
this.rollbackPending = rollbackPending;
this.index = createIndex(writeConfig);
+ this.initialTime = HoodieActiveTimeline.createNewInstantTime();
Review comment:
How about mark this `initialTime` as lastCompaction time, then we can
gei it from timeline.
then, when we get a new commit, we can check the interval between these two
timestamps to decide whether execute compact or not.
in this way:
1. there is no need to update it additionally
2. It would be more accurate.(Time elapsed since the last compact)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]