You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamicCollection cannot write a document larger than one page: no overflow on the schema-less write path #320
DynamicCollection rejects a document larger than MaxDocumentSize (one page minus header, slot and reserve; about 16 KB with the default page size) with BLiteValidationException. A typed DocumentCollection stores such a document across overflow pages (InsertWithOverflow), and since #319 the schema-less API reads those. It still cannot write them, so:
A server or scripting client of the schema-less API has a size limit the typed API does not have.
Suggested change
Give DynamicCollection the same overflow write path as DocumentCollection: insert and relocating update write [TotalLength][FirstOverflowPage][first chunk] into the slot with SlotFlags.HasOverflow and the rest into PageType.Overflow pages; the read side (OverflowChainReader, #319) and the delete side (DeleteSlot frees the chain, #319) already handle that layout. Candidates for sharing: move DocumentCollection.InsertWithOverflow / AllocateOverflowPage next to OverflowChainReader so both collections use one writer. Then BLiteMigration can drop its size check and MaxDocumentSize becomes the size of a single document BLite stores (today int.MaxValue-ish, bounded by the page count).
Tests: the DynamicCollection oracle (#272) with document sizes past one page; migration round trip of a typed database with a 40 KB document, both layouts.
Treated as a feature, not a bug: the one-page limit of DynamicCollection is deliberate and explicit in ValidateWrite. Moved to v6, outside the minor releases. Until then BLiteMigration cannot copy documents larger than a page through the schema-less API.
Activity
mrdevrobot commentedon Oct 18, 2026
Treated as a feature, not a bug: the one-page limit of DynamicCollection is deliberate and explicit in ValidateWrite. Moved to v6, outside the minor releases. Until then BLiteMigration cannot copy documents larger than a page through the schema-less API.