Matheus Bombonato
03/17/2026, 7:59 PMasync_reference: true not resolving references retroactively on bulk import (v30.1)Matheus Bombonato
03/17/2026, 8:00 PMasync_reference: true and wanted to confirm before opening a GitHub issue.
Setup:
- Collection authors — the parent, with field id
- Collection books — child, with a field author_id: { type: "string", reference: "authors.id", async_reference: true }
What happened:
1. We bulk-imported books (~300K docs) via /documents/import before authors was fully populated (authors had ~65% of the expected docs at the time)
2. async_reference: true correctly accepted all inserts without errors — as expected
3. We then imported the remaining ~35% of docs into authors, bringing it to 100%
4. Expected (per docs): "The resolution of references will happen automatically when the referenced documents get indexed later"
5. Actual: joins from authors → books did NOT resolve for the books whose author was missing at import time. Queries like $books(title:=*) on authors returned 0 results for those documents. A full re-import of books was required to fix the joins.
Question: Is async_reference only guaranteed to resolve references for single-document upserts, or should it also work retroactively after a bulk import via /documents/import? Is this a known limitation in v30.1, or a bug?
Workaround found: Re-importing books after authors is fully populated fixes everything — but it's unexpected given the docs.
Thanks!Jonathan King
03/18/2026, 12:21 AMHarpreet Sangar
03/20/2026, 4:17 PMMatheus Bombonato
03/20/2026, 9:44 PM