Skip to content

fix: use RawDocumentBuf insteadof Document in MongoDB extractor - #547

Merged
caiq1nyu merged 4 commits into
mainfrom
fix/pre-release-recheck
Jul 23, 2026
Merged

fix: use RawDocumentBuf insteadof Document in MongoDB extractor#547
caiq1nyu merged 4 commits into
mainfrom
fix/pre-release-recheck

Conversation

@caiq1nyu

@caiq1nyu caiq1nyu commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This change is motivated by two considerations:

  • BSON deserialization is relatively expensive and CPU-intensive.
  • Since Rust String must contain valid UTF-8, deserializing BSON with invalid UTF-8 content will fail.

To address these issues:

  • Avoid BSON deserialization whenever possible, or deserialize only the minimal subset of fields that is required.
  • Defer BSON parsing as much as possible, ideally until the sinker stage.

fix: #321

@caiq1nyu caiq1nyu changed the title fix: use RawDocumentBuf insteadof Document in MongoDB snapshot extractor fix: use RawDocumentBuf insteadof Document in MongoDB extractor Jul 22, 2026
@caiq1nyu
caiq1nyu marked this pull request as ready for review July 23, 2026 10:42
@caiq1nyu
caiq1nyu merged commit 2bc9a23 into main Jul 23, 2026
68 of 70 checks passed
@caiq1nyu
caiq1nyu deleted the fix/pre-release-recheck branch July 23, 2026 11:02
caiq1nyu added a commit that referenced this pull request Jul 23, 2026
#548)

* cli release ci

* more mongo struct integration test

* use RawDocumentBuf insteadof Document in MongoDB snapshot extractor

* use RawDocumentBuf insteadof Document in MongoDB cdc extractor with both oplog & changestream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] mongo to mongo bug

1 participant