kasakrisz opened a new pull request #2022:
URL: https://github.com/apache/hive/pull/2022


   ### What changes were proposed in this pull request?
   Set `materializationTime` when updating `CreationMetadata` using 
`ObjectStore.updateCreationMetadata`
   
   ### Why are the changes needed?
   When Rebuilding a MaterializedView a new `CreationMetadata` instance is 
created for the view which contains updated information like `ValidTxnList`. 
Initially this object has a `materializationTime` value with `0` and this is 
going to be stored in the `HiveMaterializedViewsRegistry` wrapped by the 
`RelOptMaterialization` object represents the view. However the 
`materializationTime` value stored in the MetaStore is recalculated and stored 
during the update hence MS and the registry has different values. This can lead 
unnecessary registry refresh or even `NullPointerException` as the jira 
explains.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test 
-Dtest=TestObjectStore#testUpdateCreationMetadataSetsMaterializationTime -pl 
standalone-metastore/metastore-server
   ```
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to