0

I have been recently migrating python code to C using libmongoc-1.0 1.15. I am having troubles creating indexes. I am following the example here. I think it has something to do with me using MongoDB 4.2 since it changed all indexes to be background by default, but I thought version 1.15.3 of libmongoc does support everything new in 4.2.

{ "createIndexes" : "mycol", "indexes" : [ { "key" : { "x" : 1, "y" : 1 }, "name" : "x_1_y_1" } ] }
{ }
Error in createIndexes: Failed to send "createIndexes" command with database "mydb": Failed to read 4 bytes: socket error or timeout

Any thoughts?

Yuki
  • 3,857
  • 5
  • 25
  • 43

1 Answers1

1
"failed to send "createIndexes" command with database "testdb" mongodb error"

I was having a similar issue, in our case, one of the replica sets was having the issue after fixing the issue related replica set and restarting the cluster issue solved

Mahesh Hegde
  • 1,131
  • 10
  • 12