-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing block polling in committer (#114)
### TL;DR Added handling for missing staging data in the Committer and improved error handling. ### What changed? - Implemented `handleMissingStagingData` function in the Committer to detect and handle missing blocks in staging data. - Updated `getSequentialBlockDataToCommit` to call `handleMissingStagingData` when no blocks are found in staging. - Added new tests to cover the missing staging data handling functionality. - Removed unnecessary assertion calls in test files. - Removed a debug log message in the `GetMaxBlockNumber` function of ClickHouseConnector. ### How to test? 1. Run the updated unit tests, particularly focusing on `TestHandleMissingStagingData` and `TestHandleMissingStagingDataIsPolledWithCorrectBatchSize`. 2. Simulate a scenario where staging data is missing and verify that the Committer correctly detects and handles the situation. 3. Check that the Committer polls for missing blocks with the correct batch size when staging data is missing. ### Why make this change? This change improves the robustness of the Committer by adding a mechanism to handle cases where expected staging data is missing. It ensures that the system can recover from potential data gaps and maintain data integrity. The additional tests provide better coverage for this new functionality, increasing overall system reliability.
- Loading branch information
Showing
3 changed files
with
111 additions
and
20 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