Skip to content

Conversation

@nischitpra
Copy link
Collaborator

@nischitpra nischitpra commented Dec 22, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Added COMMITTER_START_BLOCK configuration parameter to specify a custom starting block for the committer. When set to a value greater than 0, it overrides the default behavior. Note: Use caution when setting this value to avoid potential data duplication.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A new configuration field CommitterStartBlock is added to override the starting block for the committer. When set, it forces the committer to begin processing from the specified block number, potentially reprocessing blocks already present in ClickHouse.

Changes

Cohort / File(s) Summary
Committer Start Block Override
configs/config.go, internal/committer/committer.go
Added CommitterStartBlock configuration field to enable overriding the initial block number for committer operations. Configuration value is read via COMMITTER_START_BLOCK environment variable (default 0). Logic implements conditional override: when configured value is greater than 0, the committer uses it to adjust the maximum block number calculation, allowing reprocessing from an earlier block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the override logic correctly computes startBlock - 1 and applies the comparison against ClickHouse max
  • Confirm the >0 check properly handles the default case (no override)
  • Ensure environment variable naming is consistent with existing conventions
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch np/committer_start_block

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e8fa8b5 and 8571010.

📒 Files selected for processing (2)
  • configs/config.go
  • internal/committer/committer.go

Comment @coderabbitai help to get the list of available commands and usage tips.

@nischitpra nischitpra merged commit 0168ca2 into main Dec 22, 2025
3 of 5 checks passed
@nischitpra nischitpra deleted the np/committer_start_block branch December 22, 2025 18:17
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.

2 participants