Skip to content

Conversation

@iuwqyir
Copy link
Contributor

@iuwqyir iuwqyir commented Oct 24, 2024

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.

@iuwqyir iuwqyir changed the title make committer detect if it is stuck and solve it Add missing block polling in committer Oct 24, 2024
Copy link
Contributor Author

iuwqyir commented Oct 24, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iuwqyir and the rest of your teammates on Graphite Graphite

@iuwqyir iuwqyir marked this pull request as ready for review October 24, 2024 14:49
@iuwqyir iuwqyir force-pushed the 10-24-make_committer_detect_if_it_is_stuck_and_solve_it branch from 37e7b71 to 82449ed Compare October 24, 2024 15:06
Copy link
Contributor Author

iuwqyir commented Oct 25, 2024

Merge activity

  • Oct 25, 9:17 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 25, 9:19 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 25, 9:20 AM EDT: A user merged this pull request with Graphite.

@iuwqyir iuwqyir changed the base branch from 10-24-trigger_polling_when_gap_is_detected to graphite-base/114 October 25, 2024 13:17
@iuwqyir iuwqyir changed the base branch from graphite-base/114 to main October 25, 2024 13:17
@iuwqyir iuwqyir force-pushed the 10-24-make_committer_detect_if_it_is_stuck_and_solve_it branch from 82449ed to 6238fe2 Compare October 25, 2024 13:18
@iuwqyir iuwqyir merged commit 81d8f50 into main Oct 25, 2024
5 checks passed
@iuwqyir iuwqyir deleted the 10-24-make_committer_detect_if_it_is_stuck_and_solve_it branch October 25, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants