nsivabalan commented on code in PR #8915:
URL: https://github.com/apache/hudi/pull/8915#discussion_r1224678148
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -471,12 +471,9 @@ public Pair<HoodieMetadataLogRecordReader, Long>
getLogRecordScanner(List<Hoodie
// Only those log files which have a corresponding completed instant on
the dataset should be read
// This is because the metadata table is updated before the dataset
instants are committed.
- Set<String> validInstantTimestamps = HoodieTableMetadataUtil
- .getValidInstantTimestamps(dataMetaClient, metadataMetaClient);
-
+ Set<String> validInstantTimestamps =
HoodieTableMetadataUtil.getValidInstantTimestamps(dataMetaClient,
metadataMetaClient);
Option<HoodieInstant> latestMetadataInstant =
metadataMetaClient.getActiveTimeline().filterCompletedInstants().lastInstant();
- String latestMetadataInstantTime =
latestMetadataInstant.map(HoodieInstant::getTimestamp).orElse(SOLO_COMMIT_TIMESTAMP);
-
+ String latestMetadataInstantTime =
latestMetadataInstant.map(HoodieInstant::getTimestamp).orElse(HoodieTableMetadataUtil.createIndexInitTimestamp(SOLO_COMMIT_TIMESTAMP,
0));
Review Comment:
I don't see much benefit here too.
but not too strong.
this code will be invoked only after any partition in MDT will be
initialized(which means the table config is updated). which means, the
latestMetadataInstant should already be valid (Option will be non empty). So,
what are the chances that we will call getRecordsByKey with BaseTableMetadata
when any of MDT partitions have been initialized.
--
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]