You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that a more robust solution would be something like:
if not collection.is_mongos and collection.read_preference > 1:
return
because otherwise connections to a mongos and not a mongod won't ensure indices at all
I know it is way bigger than the scope of this issue, but this is one of the moments that I would like to have a log message saying that no indices were created
As it will fail!
The text was updated successfully, but these errors were encountered: