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

fix(db): don't send session down to createIndex command #1758

Merged
merged 1 commit into from Jun 26, 2018
Merged

fix(db): don't send session down to createIndex command #1758

merged 1 commit into from Jun 26, 2018

Conversation

vkarpov15
Copy link
Contributor

Found another issue re: Automattic/mongoose#6109 (comment) . Looks like index builds always fail if retryWrites is turned on, for example:

run2.catch(error => console.error(error.stack));

async function run() {
  const { MongoClient } = require('mongodb');
  const client = await MongoClient.connect('mongodb://localhost:27017/test?retryWrites=true');

  await client.db('test').collection('test').createIndex({ email: 1 }, {
    unique: true
  });

  console.log('done');
}

Gives you a very unhelpful "Error: cyclic dependency detected" error. This will make it so that session doesn't make it into the return value from createCreateIndexesCommand()

@mbroadst
Copy link
Member

@vkarpov15 I think you'll be happy to see mongodb-js/mongodb-core@d95a4d1 😄 Thanks for this fix as well! I'll port it to 3.1.x which will be released by tomorrow AM!

Copy link
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

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

LGTM

@mbroadst mbroadst merged commit ad6f41a into mongodb:3.0 Jun 26, 2018
@vkarpov15 vkarpov15 deleted the patch-2 branch June 26, 2018 18:48
@vkarpov15
Copy link
Contributor Author

Nice! Can we also get another 3.0.x release so I can add this fix to mongoose 5.1.x?

@mbroadst
Copy link
Member

mbroadst commented Jun 26, 2018

yep! Today will be the final 3.0 release, and it will be moved to the stable tag. 3.1.0 will be released under latest tomorrow morning

@vkarpov15
Copy link
Contributor Author

Thanks, looking forward to the last 3.0.x release 👍

@mbroadst
Copy link
Member

@vkarpov15 you got it! Just released 3.0.11 :shipit:

@vkarpov15
Copy link
Contributor Author

Thanks! Hope MongoDB World went well, looking forward to reading up on it when I get back to the states

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