Skip to content

fix: cap stored attachment text to avoid exceeding max_allowed_packet - #72

Merged
ShrihariMahabal merged 1 commit into
developfrom
fix/large-attachment-packet-size
Jul 16, 2026
Merged

fix: cap stored attachment text to avoid exceeding max_allowed_packet#72
ShrihariMahabal merged 1 commit into
developfrom
fix/large-attachment-packet-size

Conversation

@ShrihariMahabal

@ShrihariMahabal ShrihariMahabal commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Large attachments' full extracted text was stored in the attachments table, risking MySQL's max_allowed_packet. The stored column is now capped to the inline-injection threshold, while retrieval-mode chunking/embedding uses the full in-memory text instead of the (now-capped) row.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the cap is applied only to the DB write while the full text is correctly threaded through to the embedder.

The routing decision, chunking, and embedding all continue to use the complete extracted text; only the persisted column is truncated. The fallback in _index_retrieval_attachments (using row.extracted_text) is only reached if the in-memory dict lookup misses, which cannot happen on the normal call path introduced here.

No files require special attention.

Reviews (2): Last reviewed commit: "fix: cap stored attachment text to avoid..." | Re-trigger Greptile

@ShrihariMahabal
ShrihariMahabal force-pushed the fix/large-attachment-packet-size branch from 2c43e23 to bddd15b Compare July 16, 2026 17:44
@ShrihariMahabal
ShrihariMahabal merged commit 938be15 into develop Jul 16, 2026
4 checks passed
@ShrihariMahabal
ShrihariMahabal deleted the fix/large-attachment-packet-size branch July 16, 2026 17:50
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.

1 participant