-
Notifications
You must be signed in to change notification settings - Fork 39
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
Include collection name in oplog query #78
Conversation
* Move `get_latest_ts` call higher * Write state if we didn't sync anything for a stream * Add test * Don't do a deepcopy on state * Remove unused import
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.
Some comment cleanup, and left one suggestion to adjust the scenario.
# ----------------------------------- | ||
# ----------- Initial Full Table --------- | ||
# ----------------------------------- | ||
# Select simple_coll_1 and simple_coll_2 streams and add replication method metadata |
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 only collection 1 is selected. Can you update this comment.
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.
Done
self.expected_sync_streams(), | ||
self.expected_pks()) | ||
|
||
# Verify that we got at least 6 records due to changes |
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.
Can you fix this comment
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.
Done
|
||
client["simple_db"]["simple_coll_2"].insert_one({"int_field": 101, "string_field": random_string_generator()}) | ||
changed_ids.add(client['simple_db']['simple_coll_2'].find({'int_field': 101})[0]['_id']) | ||
|
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.
This scenario is good. I think it would be good to also update smilple_coll_1
and verify that a record comes through rather than no records.
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.
This can be ignored. I misunderstood the change that was being covered here.
Description of change
Currently we traverse all new oplog changes for each collection, once per collection. This change makes it so we only traverse entries for the current collection.
WIP: this breaks bookmark logic.
QA steps
Risks
Rollback steps