Skip to content

[plugin] pymongo compatible with mongodb cluster#150

Merged
kezhenxu94 merged 2 commits into
masterfrom
unknown repository
Aug 11, 2021
Merged

[plugin] pymongo compatible with mongodb cluster#150
kezhenxu94 merged 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Aug 11, 2021

Copy link
Copy Markdown

replace the this.collection.database.client.address with the this.collection.database.client.nodes to be compatible with the mongodb cluster

replace the `this.collection.database.client.address` with the `this.collection.database.client.nodes` to be compatible with the mongodb cluster

@kezhenxu94 kezhenxu94 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cooolr thank you!

def _sw_execute(this: _Bulk, *args, **kwargs):
address = this.collection.database.client.address
peer = "%s:%s" % address
nodes = this.collection.database.client.nodes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So when the MongoDB is in single-node mode, the this.collection.database.client.nodes will also contain one element?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at it and the answer is yes.

@wu-sheng wu-sheng added this to the 0.7.0 milestone Aug 11, 2021

@tom-pytel tom-pytel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment on this, your call.

@maxkezhang maxkezhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kezhenxu94 kezhenxu94 merged commit 930f4ec into apache:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin Plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants