Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SC-54155][DELTA][WARMFIX] Fail a Delta table's stream if logs are sk…
…ipped ## What changes were proposed in this pull request? Introduces a flag "failOnDataLoss" for the Delta streaming source. Our `getChanges` method to get the changes to a streaming source uses `listFrom` which returns the earliest available delta file after a given version. This version may be later than what we should be processing. In such cases, we will fail the stream unless the "failOnDataLoss" flag is set to false. Imagine the following case: 1. You start a stream 2. Process all your data 3. You stop your stream 4. The table has a delta.logRetentionDuration set to 1 day, writes happen to your table, and you Delta performs log cleanup 5. You restart your stream 2 days later. The delta files providing the changes that you need to process have already been deleted. We should fail in the case above. ## How was this patch tested? Unit tests Author: Burak Yavuz <brkyvz@gmail.com> Author: Burak Yavuz <burak@databricks.com> #13644 is resolved by brkyvz/deltaFailOn. GitOrigin-RevId: 355d168763d1909abd3c4a0335dd716829142ed4
- Loading branch information
Showing
5 changed files
with
164 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters