-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/batch backfill v18 #70
Fix/batch backfill v18 #70
Conversation
…nctions memory limits
Saw the conflicts, fixing them. |
@jasonbosco Conflict resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tests are failing
- Modify `typesenseDocumentFromSnapshot` calls to use `Promise.all`, ensuring proper handling of asynchronous operations during the backfill process from Firestore to Typesense.
In 30105bc , there was a change introduced on line 53, regarding the const currentDocumentsBatch = thisBatch.docs.map((doc) => utils.typesenseDocumentFromSnapshot(doc)); This implementation resulted in currentDocumentsBatch being an array of pending promises, as So, in b8d9207, changing this line to const currentDocumentsBatch = await Promise.all(thisBatch.docs.map(async (doc) => {
return await utils.typesenseDocumentFromSnapshot(doc);
})); takes care of the issue, resolving to the corresponding document schema that the |
Rebased master into the branch, can now target master. |
What needed to fix in this PR in order to merge it? |
Tests were failing, I've posted a comment above referencing what went wrong (returning a promise instead of unpacking it) |
So now this is just waiting for Jason approval? |
d9c0a68
to
18940f3
Compare
- Add more spaces - Add JSdoc for error logging function
This is now available in v1.5.0-rc.1. The installation link for this RC build is in the link above. |
Change Summary
The current batch mechanism is failing on Firestore big collections with a function crash.
This PR fixing this issue.
Also on this PR -
Better comments for failing batch (the current one get trimmed when multiple errors)
but for v18
PR Checklist