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

Remove explicit transactions #150

Merged
merged 2 commits into from
Apr 10, 2019
Merged

Conversation

apkar
Copy link
Contributor

@apkar apkar commented Apr 10, 2019

Explicit transactions are disabled for a while. We have a bunch of issues
related to connection affinity. They work only with sidecar setup. Even
then, they are generating quite a few corner cases with schema
management requests.

We have decided to go with MongoDB compatible transactions based on
sessions. Removing this code to make way for them.

@apkar apkar requested a review from dongxinEric April 10, 2019 04:02
Explicit transactions are disabled for a while. We have bunch of issues
related to connection affinity. They work only with sidecar setup. Even
then, they are generating quiet a few corner cases with schema
management requests.

We have decided to go with MongoDB compatible transactions based on
sessions. Removing this code to make way for them.
exceptionOne = e
try:
func1(*args2, **kwargs2)
func2(*args2, **kwargs2)
Copy link
Contributor

Choose a reason for hiding this comment

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

It was a luck/unfortunate that when using transactional_shim, func1 and func2 are always the same LOL. My bad anyways.

@@ -495,7 +495,7 @@ def insert_one(self, dict):
def insert_many(self, list):
self.insert(list)

def find(self, query, fields=None):
def find(self, query, fields=None, batch_size=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this batch_size used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

batch_size from driver converts to numberToReturn in OP_QUERY. This is kind of page size for large queries.

Copy link
Contributor

@dongxinEric dongxinEric left a comment

Choose a reason for hiding this comment

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

LGTM

@apkar apkar merged commit 0f2ad5e into FoundationDB:master Apr 10, 2019
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.

2 participants