nsivabalan commented on issue #16870:
URL: https://github.com/apache/hudi/issues/16870#issuecomment-4795644760

   Triage: this looks **fixed on master**.
   
   The stale-metaclient-after-upgrade scenario is addressed by two 
complementary changes:
   
   1. **HUDI-8395 / [PR #12224](https://github.com/apache/hudi/pull/12224)** 
(commit `71079958a7bc`): inside `BaseHoodieWriteClient.tryUpgrade()`, after 
upgrade the write client's internal metaClient is refreshed via both 
`reloadTableConfig()` and `reloadActiveTimeline()` — see 
`BaseHoodieWriteClient.java:1583-1584`.
   2. **Commit `928d603f8fa98`** (Sep 2025, in PR #13987): in 
`HoodieSparkSqlWriter.scala:522-524`, immediately after 
`client.startCommit(...)` (which triggers the upgrade), the externally-held 
`tableMetaClient` is now reloaded with `tableMetaClient.reloadTableConfig()` — 
comment in code reads *"if table has undergone upgrade, we need to reload table 
config"*. This directly covers the SQL / DataFrame writer path called out here.
   
   Note that `reloadTableConfig()` also calls `reloadTimelineLayoutAndPath()` 
(`HoodieTableMetaClient.java:599`), which refreshes `timelineLayoutVersion`, 
`tableFormat`, and `timelinePath` — so the layout-1 → layout-2 transition you 
described is handled, not just the version code.
   
   If you can confirm on a recent build, this issue can likely be closed. If 
you still hit a stale-metaclient case (e.g. structured-streaming or a 
long-lived client reusing a metaClient *across* a version transition outside 
`HoodieSparkSqlWriter`), please post a repro and we can re-open.


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