[SERVER-2664] geo_near_random failures in parallel suite Created: 02/Mar/11  Updated: 12/Jul/16  Resolved: 02/Mar/11

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: None
Fix Version/s: 1.9.0

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

sh27219| starting test: geo_near_random2
sh27219| S1 Test : jstests/all.js 203ms
sh27219| S1 Test : jstests/geo_near_random1.js ...
sh27219| starting test: geo_near_random1
sh27219| testing point: [ 0, 0 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ 0, 0 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ 170.29694362366573, 51.24143734574318 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ 53.335167698562145, -12.835224671289325 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ 19.258053189236676, -52.71366306580603 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ -41.339404338225734, 14.501830078661442 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| testing point: [ -18.142901269625867, 1.3285951036959887 ] opts:

{ "sphere" : 0, "nToTest" : 50 }

sh27219| assert: [{
sh27219| "dis" : 10.746876999658907,
sh27219| "obj" :

{ sh27219| "_id" : 567, sh27219| "loc" : [ sh27219| -28.45454671103508, sh27219| 4.356025876477361 sh27219| ] sh27219| }

sh27219| }] != [{
sh27219| "dis" : 10.746876999658907,
sh27219| "obj" :

{ sh27219| "_id" : 1230, sh27219| "loc" : [ sh27219| -28.45454671103508, sh27219| 4.356025876477361 sh27219| ] sh27219| }

sh27219| }] are not equal : undefined

sh27219| Error: Printing Stack Trace
sh27219| at shell/utils.js:21:7
sh27219| at shell/utils.js:32:1
sh27219| at Function.eq (shell/utils.js:60:42)
sh27219| at [object Object].assertIsPrefix (jstests/libs/geo_near_random.js:32:16)
sh27219| at [object Object].testPt (jstests/libs/geo_near_random.js:55:18)
sh27219| at jstests/geo_near_random2.js:13:6
sh27219| at _funcs1:7:40
sh27219| at Function.timeFunc (shell/utils.js:271:9)
sh27219| at _funcs1:7:17
sh27219| at Array.forEach (native)
sh27219| *** failed while compairing 46 and 47
sh27219|

{ sh27219| "geoNear" : "geo_near_random2", sh27219| "near" : [ sh27219| -18.142901269625867, sh27219| 1.3285951036959887 sh27219| ], sh27219| "num" : 47, sh27219| "spherical" : 0 sh27219| }

sh27219| Tue Mar 1 20:18:01 exec error: jstests/libs/geo_near_random.js:59 [{
sh27219| "dis" : 10.746876999658907,
sh27219| "obj" :

{ sh27219| "_id" : 567, sh27219| "loc" : [ sh27219| -28.45454671103508, sh27219| 4.356025876477361 sh27219| ] sh27219| }

sh27219| }] != [{

sh27219| "dis" : 10.746876999658907,
sh27219| "obj" :

{ sh27219| "_id" : 1230, sh27219| "loc" : [ sh27219| -28.45454671103508, sh27219| 4.356025876477361 sh27219| ] sh27219| }

sh27219| }] are not equal : undefined
sh27219| throw e; // rethrow
sh27219| ^
sh27219|

Looks like maybe the geo_near_random tests can't handle two points that are in the same place. Since we have one global random number seed, the tests can't run during another test that resets the seed to the same value that these tests do.

We could fix by removing the tests from the parallel suite or making the tests work when there are duplicate point locations.



 Comments   
Comment by Greg Studer [ 02/Mar/11 ]

Made the point check test for actual point values and distances, so that reordered duplicate points can get handled correctly.

Generated at Thu Feb 08 03:00:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.