[SERVER-41945] Log CannotIndexParallelArrays failure at default log level Created: 27/Jun/19  Updated: 28/Jun/19  Resolved: 28/Jun/19

Status: Closed
Project: Core Server
Component/s: Logging, Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Conchi Bueno Assignee: Eric Sedor
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-20940 Should log createIndexes failure at l... Closed
Participants:
Case:

 Description   

Hi,

Using MongoDB version 3.6.7. Also tested on 4.0.2

Trying to create an index on two arrays using the shell:

db.test.createIndex({ "array1": 1, "array2": 1}) 

it fails with this error:

{
	"operationTime" : Timestamp(1561615657, 1),
	"ok" : 0,
	"errmsg" : "cannot index parallel arrays [accountGrp] [links]",
	"code" : 171,
	"codeName" : "CannotIndexParallelArrays",
	"$clusterTime" : {
		"clusterTime" : Timestamp(1561615657, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	}
}

However, on the logs we only see:

2019-06-27T16:07:39.901+1000 I INDEX    [conn18] build index on: test.test properties: { v: 2, key: {array1: 1.0, array2: 1.0 }, name: "index_arrays_name", ns: "test.test" }
2019-06-27T16:07:39.904+1000 I INDEX    [conn18]         building index using bulk method; build may temporarily use up to 500 megabytes of RAM

There's no failure recorded.

This limits out troubleshooting capabilities. We should logged some error on the server log.



 Comments   
Comment by Eric Sedor [ 28/Jun/19 ]

We decided not to do this in SERVER-20940, but SERVER-18971 should ensure that in MongoDB 4.0, failures are logged when index builds take longer than 100ms. That means a client that initiates the command should have the opportunity to react to the error, and an op that takes longer than the slowms threshold will be logged.

Generated at Thu Feb 08 04:59:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.