Uh oh!
There was an error while loading. Please reload this page.
gmail: retry messages after body fetch failures - #244
Conversation
a816203 to
0eb9a7dComparealex-clickhouse
commented
Aug 14, 2026
One issue with this approach: suppose there is a message that for some reason fails One option would be to retry in place for 2-3 times with exponential backoff. That still doesn't save us from longer-lived failures though. More complex would be to do something similar to the Telegram one, which stores json, and then we could keep track of individual ids and their status. But that's probably a bit too much. |
mc806888-png
commented
Aug 24, 2026
|
Problem
Gmail search and body retrieval happen separately. When
gog gmail getfailed or timed out, the source still created a record from the search metadata with an empty body and advanced the shared timestamp cursor. The recovered message was then behind the cursor, leaving only the header-only record permanently stored.Fix
Verification
Regression coverage exercises a partial failure followed by recovery, an exception during initial sync, and a nonzero body-fetch command.
.venv/bin/python -m pytest -q tests/test_gmail_source.py tests/test_source_filters.py tests/test_db.py: 134 passed