Skip to content

fix(#206): batch size and include docs#207

Merged
witash merged 5 commits intomainfrom
206-batch_size_and_include_docs
Aug 5, 2025
Merged

fix(#206): batch size and include docs#207
witash merged 5 commits intomainfrom
206-batch_size_and_include_docs

Conversation

@witash
Copy link
Copy Markdown
Contributor

@witash witash commented Jun 23, 2025

Adds batch_size and include_docs to couch2pg changes feed request.
small changes to loadAndStoreDocs to use the documents from the changes feed directly instead of requesting all_docs

@witash
Copy link
Copy Markdown
Contributor Author

witash commented Jun 23, 2025

Hi @dianabarsan can you review this?
Do you know why the original couch2pg gets the documents in a separate request? and if there is any reason we shouldn't if it performs better?
Loading documents directly from the changes feed with include_docs=true should be equivalent (in both cases it gets the latest or winning revision) but its not exactly the same...in particular the id is not directly on the change object, but it is on the results from all_docs. So when getting docs from the changes feed, need to get row.doc._id instead of row.id. But it should always be the same...

@witash witash requested a review from dianabarsan June 23, 2025 12:37
@witash witash changed the title 206 batch size and include docs fix(#206): batch size and include docs Jun 23, 2025
@witash witash closed this Aug 5, 2025
@witash witash reopened this Aug 5, 2025
@witash witash merged commit 8bf6819 into main Aug 5, 2025
9 of 11 checks passed
@witash witash deleted the 206-batch_size_and_include_docs branch August 5, 2025 09:35
@medic-ci
Copy link
Copy Markdown

medic-ci commented Aug 5, 2025

🎉 This PR is included in version 2.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants