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

[BUG] Migration does not run locally after upgrading to 1.19.1 #578

Open
prabhumarappan opened this issue Jun 1, 2023 · 4 comments
Open

Comments

@prabhumarappan
Copy link

prabhumarappan commented Jun 1, 2023

Describe the bug
After upgrading to 1.19.1, we are having issues with running migration locally (on a single instance MongoDB, running on docker).
Screenshot 2023-05-31 at 18 10 32

To Reproduce

Expected behavior
When running locally or without a replica set, this should't run transactions and run into this error.

Additional context
Add any other context about the problem here.

@prabhumarappan
Copy link
Author

@roman-right we can probably check if client.is_mongos is True here, then run it in session. Otherwise, we can just pass the session as None and make it Optional here

@roman-right
Copy link
Member

Hi! Hm, this makes sense. The problem is using migrations without transactions is a bit risky as it will not roll back correctly. I probably can add something like --dev flag for the client to run it without transactions if it can not run them

@prabhumarappan
Copy link
Author

@roman-right, that works, thanks!

@mikeler216
Copy link

Hey is there somebody working on this if not I can try to pick this up?

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

No branches or pull requests

4 participants