[COMPASS-2546] When schema analysis agg pipeline times out, Compass UI remains frozen. Created: 15/Feb/18  Updated: 29/Oct/23  Resolved: 17/Apr/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.11.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Brian Blevins Assignee: Anna Herlihy (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File end_station_location_geo_query_schema_analysis.png     PNG File image-2018-02-15-14-53-23-559.png    
Issue Links:
Duplicate
duplicates COMPASS-3539 Compass Hangs When Sampling Larger Co... Closed
Related
related to COMPASS-3157 Enforce maxTimeMS for every query sen... Closed
Epic Link: COMPASS-2234
Sprint: Iteration Bison

 Description   

Anyone can connect to the M001 student cluster.

Hostname: cluster0-shard-00-00-jxeqq.mongodb.net
Username: m001-student
Password: m001-mongodb-basics
Replica Set Name: Cluster0-shard-0
Read Preference: Primary Preferred

The citibike.trips collection contains about 2 million documents with average size 440 bytes.

The following queries against the start and end station location fields caused the Compass schema analysis to hang the user interface.

{'start station location': {$geoWithin: { $centerSphere: [ [ -73.98475067347545, 40.73712494487114 ], 0.0013784387806381328 ]}}}
{'end station location': {$geoWithin: { $centerSphere: [ [ -73.98475067347545, 40.73712494487114 ], 0.0013784387806381328 ]}}}

The following query causes the schema analysis to take longer than 10 seconds and then freeze about in about two thirds of my tests.

{tripduration: {$gte: 60, $lt: 50010}}

Neither the DevTools nor "DEBUG=*" command line outputs showed any subsequent output when the agg pipeline times out.

I captured the following from the Atlas real time tab.

{
  "waitingForLock" : false,
  "desc" : "conn9493",
  "threadId" : "140398637815552",
  "client" : "71.14.15.226:54915",
  "ns" : "citibike.trips",
  "clientMetadata" : {
    "os" : {
      "type" : "Darwin",
      "name" : "darwin",
      "architecture" : "x64",
      "version" : "15.6.0"
    },
    "platform" : "Node.js v7.4.0, LE, mongodb-core: 2.1.17",
    "driver" : {
      "name" : "nodejs",
      "version" : "2.2.33"
    }
  },
  "opid" : 2140841,
  "op" : "command",
  "lockStats" : {
    "Global" : {
      "acquireCount" : {
        "r" : 25076
      }
    },
    "Database" : {
      "acquireCount" : {
        "r" : 12538
      }
    },
    "Collection" : {
      "acquireCount" : {
        "r" : 12537
      }
    }
  },
  "planSummary" : "IXSCAN { tripduration: 1 }",
  "active" : true,
  "secs_running" : 8,
  "microsecs_running" : 8988974,
  "query" : {
    "aggregate" : "trips",
    "pipeline" : [{
        "$match" : {
          "tripduration" : {
            "$gte" : 60,
            "$lt" : 50010
          }
        }
      }, {
        "$sample" : {
          "size" : 1000
        }
      }],
    "allowDiskUse" : true,
    "maxTimeMS" : 10000,
    "cursor" : {
      "batchSize" : 1000
    }
  },
  "connectionId" : 9493,
  "numYields" : 11918,
  "locks" : {
    "Global" : "r",
    "Database" : "r",
    "Collection" : "r"
  }
}



 Comments   
Comment by Githook User [ 29/Apr/19 ]

Author:

{'email': 'anna.herlihy@10gen.com', 'name': 'anna herlihy', 'username': 'aherlihy'}

Message: COMPASS-2546 - Error on timeout in Schema Tab (#1693)

Comment by Githook User [ 17/Apr/19 ]

Author:

{'name': 'anna herlihy', 'username': 'aherlihy', 'email': 'anna.herlihy@10gen.com'}

Message: COMPASS-2546 - Error on timeout in Schema Tab (#1693)

Comment by Githook User [ 17/Apr/19 ]

Author:

{'name': 'anna herlihy', 'username': 'aherlihy', 'email': 'anna.herlihy@10gen.com'}

Message: COMPASS-2546 - Error on timeout in Schema Tab (#1693)

Comment by Githook User [ 17/Apr/19 ]

Author:

{'name': 'anna herlihy', 'username': 'aherlihy', 'email': 'anna.herlihy@10gen.com'}

Message: COMPASS-2546 - Error on timeout in Schema Tab (#1693)

Comment by Githook User [ 17/Apr/19 ]

Author:

{'email': 'anna.herlihy@10gen.com', 'name': 'aherlihy', 'username': 'aherlihy'}

Message: COMPASS-2546 - Error on timeout in Schema Tab
Branch: 2546-dev
https://github.com/10gen/compass/commit/c7e0d0b0e3428eae3dcfc7e518ad67383b7ccb22

Comment by Githook User [ 16/Apr/19 ]

Author:

{'name': 'aherlihy', 'username': 'aherlihy', 'email': 'anna.herlihy@10gen.com'}

Message: COMPASS-2546 - Error on timeout in Schema Tab
Branch: 2546-dev
https://github.com/10gen/compass/commit/c22dee8370e124c45bbe9cfd5c90e64944a9bbb1

Generated at Wed Feb 07 22:30:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.