pvary commented on issue #1496:
URL: https://github.com/apache/iceberg/issues/1496#issuecomment-712099812


   Thanks @fbocse for the review!
   
   > @pvary thank you for following up on this
   
   Actually @lcspinter is the one who is working on this 😄
   
   > This basically "locks" the table for any subsequent writers - cause new 
writers will find version-hint.txt and load value 18, increment that value to 
resolve the version they should write a new metadata file for but fail to do so 
since there already is a v19.metadata.json file.
   
   I think this should not be a problem as we use version-hint.txt only as a 
hint and in 
[HadoopTableOperations.refresh()](https://github.com/apache/iceberg/blob/96959ece9faeb795757388908274cfd0ff1856ca/core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java#L108-L113)
 we iterate through on the possible metadata locations and stop only if there 
is not new snapshot is available:
   ```java
         Path nextMetadataFile = getMetadataFile(ver + 1);
         while (nextMetadataFile != null) {
           ver += 1;
           metadataFile = nextMetadataFile;
           nextMetadataFile = getMetadataFile(ver + 1);
         }
   ```
   
   I hope this loop solves the dead-lock problem you mentioned above.
   What do you think?
   
   Thanks,
   Peter
   


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to