voonhous opened a new issue, #21104:
URL: https://github.com/apache/hudi/issues/21104

   ### Describe the problem
   
   Turning on the record index on a METADATA_ONLY bootstrapped table fails when 
the index is initialized:
   
   ```
   org.apache.hudi.exception.HoodieMetadataException: Failed to create metadata 
payload for record index. Instant time parsing for 00000000000001 failed
        at 
org.apache.hudi.metadata.HoodieMetadataPayload.parseRecordIndexInstantTime(HoodieMetadataPayload.java:671)
        at 
org.apache.hudi.metadata.index.record.BaseRecordIndexer.lambda$readRecordKeysFromFileSliceSnapshot$...(BaseRecordIndexer.java:275)
   ```
   
   Bootstrapped file groups have the bootstrap instant `00000000000001` as 
their base instant time. 
`BaseRecordIndexer#readRecordKeysFromFileSliceSnapshot` parses it with 
`HoodieMetadataPayload#parseRecordIndexInstantTime`, which only accepts real 
instant times, so the write that initializes the index fails.
   
   Steps to reproduce:
   
   1. METADATA_ONLY bootstrap a partitioned parquet source table.
   2. Write to the table with 
`hoodie.metadata.global.record.level.index.enable=true`.
   
   ### Expected behavior
   
   The record index is built for the bootstrapped file groups, like for any 
other file group.
   
   ### Notes
   
   - The instant time parsing in the record index came with #18965.
   - The secondary index needs the record index, so it cannot be built on these 
tables either. Once the record index works, its initialization may hit a second 
problem: `SecondaryIndexRecordGenerationUtils` takes the reader schema from the 
base file footer (around line 345), which for a skeleton file has only the meta 
columns. Not verified yet.
   - Found while fixing #21102.
   
   **Hudi version:** master (5cd6566)
   **Query engine:** Spark
   


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