singer-io / tap-mongodb

GNU Affero General Public License v3.0
28 stars 38 forks source link

Tdl 23609 fix empty projection #102

Closed RushiT0122 closed 1 year ago

RushiT0122 commented 1 year ago

Description of change

From Pymongo 4.3+,

Empty projections (eg {} or []) for find(), and find_one() are passed to the server as-is rather than the previous behavior which substituted in a projection of {"_id": 1}. This means that an empty projection will now return the entire document, not just the "_id" field.

which results in 2 failures,

  1. Integration test failure
  2. While syncing oplogs, empty projection emits one record with only "_id" field

These issues have been addressed in this PR.

QA steps

Risks

Rollback steps