ING-1495: When creating/dropping a primary idx, call consistency helpers with '#primary'#365
Conversation
There was a problem hiding this comment.
@DemetrisChr nice catch, would you be able to add a test case to TestQueryManagement in gateway/test/query_mgmt_test.go that covers this case (where the primary index name is nil)?
f24f1d2 to
9069ba6
Compare
I've added a test. I wanted it to be as exhaustive as the ones for the named primary index, but it wasn't straightforward to make the individual tests isolated, because they all operate on the same index. So I've added a simpler test that verifies that the index can be dropped and created. I've also spotted that |
…ers with '#primary'
9069ba6 to
7e16397
Compare
After creating a primary index with no custom name (i.e. the name is #primary),
EnsureQueryIndexCreatedis called with the empty string as the name, instead of setting it to#primary. This means that theEnsureQueryIndexCreatedcall, and the overallCreatePrimaryIndexRPC call, don't return, until timeout.