Today one of the users of our MongoDB 3.0.12 sharded cluster has (wrongly) issued a foreground index build on its own database (pride_archive_ms), after the operation completed on the primary member of each replica set (shard), it got replicated to the secondaries.
I was expecting the database where the index build still is in progress to be blocked for read and writes, but actually all the databases read/writes are blocked when using secondary or secondaryPreferred read preference. Any opened session simply gets appended. Is this the expected behaviour? The docs report that:
Any operation that requires a read or write lock on all databases (e.g. listDatabases) will wait for the foreground index build to complete.
But in our case are simple find() on distinct databases from the one the index is being built on.
Could anyone please shed some light?
Thanks