danny0405 commented on code in PR #10976:
URL: https://github.com/apache/hudi/pull/10976#discussion_r1556736368
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -140,6 +141,22 @@ protected void init(HoodieTableMetaClient metaClient,
HoodieTimeline visibleActi
*/
protected void refreshTimeline(HoodieTimeline visibleActiveTimeline) {
this.visibleCommitsAndCompactionTimeline =
visibleActiveTimeline.getWriteTimeline();
+ this.timelineHashAndPendingReplaceInstants = null;
+ }
+
+ /**
+ * Get a list of pending replace instants. Caches the result for the active
timeline.
+ * The cache is invalidated when {@link #refreshTimeline(HoodieTimeline)} is
called.
+ *
+ * @return list of pending replace instant timestamps
+ */
+ private List<String> getPendingReplaceInstants() {
+ HoodieActiveTimeline activeTimeline = metaClient.getActiveTimeline();
Review Comment:
> Can't multiple threads access the same timeline?
It could, and we should introduce some synchronized code guard for the
access of the cache, we already did that for some caches in the timeline.
> What do you mean by "map cache"?
My typo, it's the "Pair" cache here.
--
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]