Yan Zhao
04/01/2023, 3:50 PMdef checkConflicts(): Unit = {
checkProtocolCompatibility()
checkNoMetadataUpdates()
checkForAddedFilesThatShouldHaveBeenReadByCurrentTxn()
checkForDeletedFilesAgainstCurrentTxnReadFiles()
checkForDeletedFilesAgainstCurrentTxnDeletedFiles()
checkForUpdatedApplicationTransactionIdsThatCurrentTxnDependsOn()
reportMetrics()
}
I want to know how dose checkNoMetadataUpdates()
work.
Here I give a case to describe it.
I have two writers, both of them will to update the metadata. Before update, the snapshot version is 1.
Both of them commit the updateSchema action to the table, and the target metadata structure is same.
The first writer commit 2.json succeed, the second writer commit 2.json failed, then the second writer will do the retry commit, and check the conflicting.
In this case, dose the second writer checkNoMetadataUpdates()
will throw MetadataChangedException
?Scott Sandre (Delta Lake)
04/08/2023, 3:13 AMYan Zhao
04/09/2023, 3:09 AM