vamshikrishnakyatham opened a new pull request, #13852:
URL: https://github.com/apache/hudi/pull/13852

   ### Change Logs
   
   Fixed upgrade and downgrade back for lower version tables (like V6→V9→V6) 
upgrade/downgrade failures caused by Avro format inconsistency between timeline 
archiver versions. The issue occurred because `TimelineArchiverV1` produces raw 
binary-encoded Avro records (without magic bytes) while `TimelineArchiverV2` 
produces Avro file format (with `Obj\x01` magic bytes). During 
upgrade/downgrade operations, this format mismatch caused 
`InvalidAvroMagicException` and `NoSuchElementException`.
   
   **Key Changes:**
   - Enhanced `LegacyArchivedMetaEntryReader.readInstant()` with magic bytes 
detection to ensure consistent Avro file format output
   - Added specific archival configurations to `testV6TableUpgradeToV9ToV6` for 
controlled test environment
   
   ### Impact
   
   **User-Facing Changes:**
   - Fixes table upgrade/downgrade functionality for users migrating between 
Hudi versions, for example V6↔V9 transitions
   - Eliminates `InvalidAvroMagicException` and `NoSuchElementException` errors 
during upgrade/downgrade operations
   
   **API Changes:**
   - No public API changes
   - Internal metadata conversion logic enhanced for better format handling
   
   ### Risk level:
   
   low
   
   ### Documentation Update
   
   None required.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Change Logs and Impact were stated clearly  
   - [x] Adequate tests were added if applicable
   - [ ] CI passed


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