[ 
https://issues.apache.org/jira/browse/LUCENE-7127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated LUCENE-7127:
--------------------------------
    Attachment: LUCENE-7127.patch

Here is more iteration on the tests. I tried to make the multithreaded test 
reproduce better by using a random for each thread (i still have 
reproducibility issues when it fails).

Since there are some issues around distances, I also moved the random distance 
tests from TestLatLonPointDistanceQuery here into the base class.

With points this test always takes ~ 1s, but I got a hang. I'm not sure its 
something like simpletext since from the stack it seems like something else is 
happening, maybe a bug in the TermsEnum? Another thing to investigate.

{noformat}
   [junit4] 
"TEST-TestLegacyGeoPointQuery.testRandomDistance-seed#[8AC41F463F800FFE]" #13 
prio=5 os_pri
   [junit4] o=0 tid=0x00007f038006a800 nid=0x52cb runnable [0x00007f03a733e000]
   [junit4]    java.lang.Thread.State: RUNNABLE
   [junit4]     at 
org.apache.lucene.spatial.util.GeoRelationUtils.rectCrossesCircle(GeoRelationUtils.java:435)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQueryImpl$GeoPointRadiusCellComparator.cellCrosses(GeoPointDistanceQueryImpl.java:57)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQueryImpl$GeoPointRadiusCellComparator.cellIntersectsShape(GeoPointDistanceQueryImpl.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:91)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNu
   [junit4] mericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNum
   [junit4] ericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointN
   [junit4] umericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:69)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.relateAndRecurse(GeoPointNumericTermsEnum.java:100)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.computeRange(GeoPointNumericTermsEnum.java:70)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointNumericTermsEnum.<init>(GeoPointNumericTermsEnum.java:50)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointTermsEnum.newInstance(GeoPointTermsEnum.java:52)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointMultiTermQuery.getTermsEnum(GeoPointMultiTermQuery.java:94)
   [junit4]     at 
org.apache.lucene.spatial.geopoint.search.GeoPointTermQueryConstantScoreWrapper$1.scorer(GeoPointTermQueryConstantScoreWrapper.java:94)
   [junit4]     at org.apache.lucene.search.Weight.bulkScorer(Weight.java:135)
   [junit4]     at 
org.apache.lucene.search.LRUQueryCache$CachingWrapperWeight.bulkScorer(LRUQueryCache.java:644)
   [junit4]     at 
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:68)
   [junit4]     at 
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:68)
   [junit4]     at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:666)
   [junit4]     at 
org.apache.lucene.search.AssertingIndexSearcher.search(AssertingIndexSearcher.java:91)
   [junit4]     at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
   [junit4]     at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:592)
   [junit4]     at 
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:577)
   [junit4]     at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:504)
   [junit4]     at 
org.apache.lucene.spatial.util.BaseGeoPointTestCase.doRandomDistanceTest(BaseGeoPointTestCase.java:923)
   [junit4]     at org.apache.lucene.spatial.util.BaseGeoPointTestCas
   [junit4] e.testRandomDistance(BaseGeoPointTestCase.java:855)
{noformat}



> remove epsilon-based testing from lucene/spatial
> ------------------------------------------------
>
>                 Key: LUCENE-7127
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7127
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Robert Muir
>         Attachments: LUCENE-7127.patch, LUCENE-7127.patch
>
>
> Currently, the random tests here allow a TOLERANCE and will fail if the error 
> exceeds. But this is not fun to debug! It also keeps the door wide open for 
> bugs to creep in.
> Alternatively, we can rework the tests like we did for sandbox/ points. This 
> means the test is aware of the index-time quantization and so it can demand 
> exact answers.
> Its more difficult at first, because even floating point error can cause a 
> failure. It requires us to maybe work through corner cases/rework 
> optimizations. If any epsilons must be added, they can be added to the 
> optimizations themselves (e.g. bounding box) instead of the user's result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to