Skip to content

Comments

Enforce stricter checks on certain constants#8500

Merged
mergify[bot] merged 3 commits intosigp:unstablefrom
0xMushow:fix/sync-off-by-one-boundaries
Feb 23, 2026
Merged

Enforce stricter checks on certain constants#8500
mergify[bot] merged 3 commits intosigp:unstablefrom
0xMushow:fix/sync-off-by-one-boundaries

Conversation

@0xMushow
Copy link
Contributor

Issue Addressed

Which issue # does this PR address?
None

Proposed Changes

All of these are performing a check, and adding a batch, or creating a new lookup, or a new query, etc..
Hence all of these limits would be off by one.

Example:

// BACKFILL_BATCH_BUFFER_SIZE = 5
  if self.batches.iter().filter(...).count() >= BACKFILL_BATCH_BUFFER_SIZE {
      return None;  // ← REJECT
  }
  // ... later adds batch via Entry::Vacant(entry).insert(...)

Without the > being changed to a >= , we would allow 6. The same idea applies to all changes proposed.

Additional Info

Please provide any additional information. For example, future considerations
or information useful for reviewers.

@0xMushow 0xMushow changed the title Fix/sync off by one boundaries Enforce stricter checks on certain constants Nov 28, 2025
@cla-assistant
Copy link

cla-assistant bot commented Nov 28, 2025

CLA assistant check
All committers have signed the CLA.

@0xMushow 0xMushow changed the base branch from stable to unstable November 28, 2025 16:02
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a valid cleanup, however note that changing > to >= reduces the effective runtime limits by 1 (e.g., batch buffers go from 6 to 5, retries from 4 to 3). Impact should be negligible but it is a subtle change in production behavior, not just a cleanup.

@jimmygchen jimmygchen added the ready-for-merge This PR is ready to merge. label Feb 20, 2026
@jimmygchen
Copy link
Member

@mergify queue

@mergify
Copy link

mergify bot commented Feb 23, 2026

Merge Queue Status

🛑 Queue command has been cancelled

@mergify mergify bot added the queued label Feb 23, 2026
@mergify
Copy link

mergify bot commented Feb 23, 2026

Merge Queue Status

Rule: default


This pull request spent 33 minutes 12 seconds in the queue, including 30 minutes 5 seconds running CI.

Required conditions to merge
  • check-success=local-testnet-success
  • check-success=test-suite-success

mergify bot added a commit that referenced this pull request Feb 23, 2026
@mergify mergify bot merged commit 2b21417 into sigp:unstable Feb 23, 2026
36 checks passed
@mergify mergify bot removed the queued label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants