Skip to content

fix(email): complete backfill jobs for empty mailboxes#4068

Merged
gbirman merged 1 commit into
mainfrom
gab/macro-cAVqPnNdV2r14dBe73PVW-email-backfill-never-completes-for-an-empty-mailbox
Jun 15, 2026
Merged

fix(email): complete backfill jobs for empty mailboxes#4068
gbirman merged 1 commit into
mainfrom
gab/macro-cAVqPnNdV2r14dBe73PVW-email-backfill-never-completes-for-an-empty-mailbox

Conversation

@gbirman

@gbirman gbirman commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Backfill jobs are only finalized when a finished thread bumps the Redis counter to the job total, so a mailbox with zero threads stayed InProgress forever — leaving the inbox syncing and blocking resyncs (one in-flight job per link). init_backfill now completes the job directly when total_threads == 0, and list_threads does the same when the job retrieves no threads at all (covers a stale/approximate Gmail profile count). Closes 019eb3d0-de70-758e-98aa-fbb1f4584964.

@macro-application

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@gbirman, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 minutes and 22 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4f817bfe-ce53-48bb-afe9-7f90c107c3a0

📥 Commits

Reviewing files that changed from the base of the PR and between 1108c76 and f40dbc2.

📒 Files selected for processing (3)
  • rust/cloud-storage/email_service/src/pubsub/backfill/increment_counters.rs
  • rust/cloud-storage/email_service/src/pubsub/backfill/init.rs
  • rust/cloud-storage/email_service/src/pubsub/backfill/list_threads.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

A backfill job is only finalized when a finished thread bumps the Redis
counter to the job total, so a mailbox with zero threads stayed InProgress
forever, leaving the inbox syncing and blocking resyncs. Complete the job
directly in init_backfill when total_threads is 0, and likewise in
list_threads when the job retrieves no threads at all (stale profile count).
@gbirman gbirman force-pushed the gab/macro-cAVqPnNdV2r14dBe73PVW-email-backfill-never-completes-for-an-empty-mailbox branch from 5633f9c to f40dbc2 Compare June 15, 2026 15:13
@gbirman gbirman merged commit 07e2c44 into main Jun 15, 2026
21 checks passed
@gbirman gbirman deleted the gab/macro-cAVqPnNdV2r14dBe73PVW-email-backfill-never-completes-for-an-empty-mailbox branch June 15, 2026 15:18
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.

1 participant