Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Saving two docs via bulkDocs causes two replication requests #7095
I'm creating two new documents and saving them using the bulkDocs API. In the background I have a continuous replication to the server. When the docs are saved PouchDB makes two replication requests one for each doc, when it should make one with both docs.
In the IDB runBatchedCursor implementation the batch size is being passed as -1, which means
var useGetAll = typeof objectStore.getAll === 'function' && typeof objectStore.getAllKeys === 'function' && (batchSize > 1 || batchSize === -1) && !descending;
NB: There is a comment above the block which states:
I'm not really sure what this means or if the proposed change will have unintended consequences.