danny0405 commented on code in PR #12224:
URL: https://github.com/apache/hudi/pull/12224#discussion_r1843462979


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1432,12 +1447,11 @@ public void setWriteTimer(String commitType) {
    * @param metaClient instance of {@link HoodieTableMetaClient} to use.
    * @param instantTime instant time of interest if we have one.
    */
-  protected void tryUpgrade(HoodieTableMetaClient metaClient, Option<String> 
instantTime) {
+  protected boolean tryUpgrade(HoodieTableMetaClient metaClient, 
Option<String> instantTime) {
     UpgradeDowngrade upgradeDowngrade =
         new UpgradeDowngrade(metaClient, config, context, 
upgradeDowngradeHelper);
 
-    if 
(upgradeDowngrade.needsUpgradeOrDowngrade(HoodieTableVersion.current())) {
-      metaClient = HoodieTableMetaClient.reload(metaClient);

Review Comment:
   It looks like this line is problematic, if we always use the same reference 
passed in, it should work, that is: use `metaClient.reloadActiveTimeline();` 
here instead of replace the metaClient reference.



-- 
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]

Reply via email to