Skip to content
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

binh/incremental snapshot keys #4256

Closed

Conversation

xinbinhuang
Copy link
Contributor

ywu-stripe and others added 30 commits April 5, 2022 13:22
…_FORCE_DEPLOY

Set up Stripe build for Debezium
Co-authored-by: Yang <y.wu4515@gmail.com>
Pass raw_oplog into Debezium output
Use DocumentCodec instead of BsonDocumentCodec
* Enforce RawBsonDocument for oplog capture mode
As title, because of change in mongo driver Debezium requires we provide primary host name in `mongo.hosts`: https://issues.redhat.com/browse/DBZ-4802

This is also documented in public doc:
https://debezium.io/documentation/reference/1.9/connectors/mongodb.html#mongodb-property-mongodb-hosts

This PR fixes the problem and allow Debezium to find primary with any seed node in a replset.

I tested in QA with config:
```
$ curl -s localhost:28082/connectors/prototype:mongo_shard_test_4_4/config | jq | grep hosts
  "mongodb.hosts": "shard_test_4_4/10.100.246.141:27017",
```

And verified in the log:
```
[2022-06-02 03:06:20,772] INFO Monitor thread successfully connected to server with description ServerDescription{address=10.100.231.135:27017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=2663627, setName='shard_test_4_4', canonicalAddress=10.100.231.135:27017, hosts=[10.100.218.89:27017, 10.100.231.135:27017, 10.100.246.141:27017], passives=[], arbiters=[], primary='10.100.231.135:27017', tagSet=TagSet{[]}, electionId=7fffffff0000000000000043, setVersion=223614, topologyVersion=TopologyVersion{processId=628fc6e5337d7b3e752992a4, counter=21}, lastWriteDate=Thu Jun 02 03:06:20 GMT 2022, lastUpdateTimeNanos=279667569826225} (org.mongodb.driver.cluster)
```

^ we found the primary `10.100.231.135:27017` automatically

(Squashed by Merge Queue - Original PR: https://git.corp.stripe.com/stripe-private-oss-forks/debezium/pull/18)
* Support skip operation filter on oplog capture mode
…skipping-noop-oplog

Allow skipping noop oplogs via skipped.operations config
…m/fix-get-transaction-id

Fix getTransactionId
MongoDb connector should use "config" database if the database exists. Otherwise, "local" database should be used to get MongoDB version during connector validation.

This is similar to the approach implemented in ReplicaSetDiscovery class.
Naros and others added 25 commits July 7, 2022 20:26
…sync-1.9.4.Final

Backport upstream changes from debezium-connector-mongodb v1.9.4.Final
…rry-pick-pre-image

cherry-pick: DBZ-5628 Added support for Mongo pre-image in change stream
…-image-base

Make Mongo debezium to emit raw BSON
* StripeAudit filtering on oplog mode (debezium#33)
Put the backfill filtering log in debugMode
This is cherry pick debezium@2a366cf from upstream to support wallTime

The change has already ran integration test suite in the OSS repo, I also tested it out in QA RS:
```
{"ts": {"$timestamp": {"t": 1674688491, "i": 366}}, "t": 24009, "h": -4248973613377760749, "v": 2, "op": "d", "ns": "locallockdb_9999.merchant_shard_locks", "ui": {"$binary": "eWsvM4XaTze4ne15thV79A==", "$type": 4}, "stripeAudit": "{\"action_id\":\"qa-ingress--0b264e18bbf61bf2d.far-aws-pdx-1.apiori.com/2iqcnsprjF-148443\",\"df_computation\":\"mono-bapi-srv.AccountCreateMethod\",\"host\":\"mono-bapi-srv-p5-green-5f6c4f987b-grkd8.monobapibox.northwest.qa.stripe.io\",\"project\":\"account_abstractions_apis\",\"shard_key\":\"1tfmk21Fwi9\"}", "wall": {"$date": 1674688491324}, "preImageOpTime": {"ts": {"$timestamp": {"t": 1674688491, "i": 365}}, "t": 24009}, "o": {"_id": "mslk_1MUIB5tfmk21Fwi9sJwt7VY5"}}
```

I cannot test CES since 4.4 change event does not have wallTime

(Squashed by Merge Queue - Original PR: https://git.corp.stripe.com/stripe-private-oss-forks/debezium/pull/37)
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Welcome as a new contributor to Debezium, @xinbinhuang. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively.

@xinbinhuang xinbinhuang closed this Feb 4, 2023
@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Hi @xinbinhuang, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

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