Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Flaky Test failure GeoTileGridIT.testGeoShapes #212

Closed
minalsha opened this issue Jan 31, 2023 · 8 comments
Closed

[BUG] Flaky Test failure GeoTileGridIT.testGeoShapes #212

minalsha opened this issue Jan 31, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@minalsha
Copy link

@mch2 commented on Fri Jan 27 2023

REPRODUCE WITH: ./gradlew ':modules:geo:internalClusterTest' --tests "org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes" -Dtests.seed=DCE20E20A42AFD34 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=und -Dtests.timezone=America/Yakutat -Druntime.java=19

org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT > testGeoShapes FAILED
    java.lang.AssertionError: Geotile 3/7/4 has wrong doc count  expected:<46> but was:<1>
        at __randomizedtesting.SeedInfo.seed([DCE20E20A42AFD34:365FB6EF2B56AE29]:0)
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:647)
        at org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes(GeoTileGridIT.java:78)

https://build.ci.opensearch.org/job/gradle-check/10078/consoleFull
opensearch-project/OpenSearch#5898 (comment)


@mch2 commented on Mon Jan 30 2023

https://build.ci.opensearch.org/job/gradle-check/10076/

@minalsha
Copy link
Author

assigning it to geospatial team to help triage

@heemin32 heemin32 self-assigned this Jan 31, 2023
@heemin32 heemin32 added the bug Something isn't working label Jan 31, 2023
@navneet1v
Copy link
Collaborator

navneet1v commented Jan 31, 2023

@minalsha Does the rerun of this test results in failure too?

@heemin32
Copy link
Collaborator

I was able to reproduce the failure with JAVA19. The test passed with JAVA17 and JAVA18.

@heemin32
Copy link
Collaborator

Still investigating. It is not related with JAVA version but with a seed of random values.

@heemin32
Copy link
Collaborator

Test is failing when bounding box filtering option is provided. The failure could happen when multiple shapes belong to a single tile and bounding box filters part of them.

When we calculate the expected number of document for a tile, we do it without any filtering. https://github.com/opensearch-project/OpenSearch/blob/b1cf2d144ebac899bcae9880ee51728df397b5c0/modules/geo/src/internalClusterTest/java/org/opensearch/geo/search/aggregations/bucket/AbstractGeoBucketAggregationIntegTest.java#L98-L102

If bounding box is provided, it might filter some of the document and the number of document in response could be less than what we calculated before for the tile.

@navneet1v
Copy link
Collaborator

navneet1v commented Feb 1, 2023

Found the issue, the first problem is here: https://github.com/opensearch-project/OpenSearch/blob/b1cf2d144ebac899bcae9880ee51728df397b5c0/modules/geo/src/internalClusterTest/java/org/opensearch/geo/search/aggregations/bucket/AbstractGeoBucketAggregationIntegTest.java#L91-L96 , there is double if condition added. Seems like a copy paste error to me.

1 more thing, which is an edge case, we don't need to compute buckets for shapes for a given precision if they are outside the BB. This can also cause issues if the bucket and BB is intersecting the bucket at corners. Will fix this also. It was added for geohashes but was not present for geotiles aggregation.

navneet1v added a commit to navneet1v/OpenSearch that referenced this issue Feb 1, 2023
…tion.

Signed-off-by: Navneet Verma <navneev@amazon.com>
navneet1v added a commit to navneet1v/OpenSearch that referenced this issue Feb 1, 2023
…tion.

Signed-off-by: Navneet Verma <navneev@amazon.com>
navneet1v added a commit to navneet1v/OpenSearch that referenced this issue Feb 1, 2023
…tion.

Signed-off-by: Navneet Verma <navneev@amazon.com>
@navneet1v
Copy link
Collaborator

@minalsha raised this PR: opensearch-project/OpenSearch#6120, please check the PR . Once this is approved. the tests will be consistent.

navneet1v added a commit to navneet1v/OpenSearch that referenced this issue Feb 1, 2023
…tion.

Signed-off-by: Navneet Verma <navneev@amazon.com>
navneet1v added a commit to navneet1v/OpenSearch that referenced this issue Feb 2, 2023
…tion.

Signed-off-by: Navneet Verma <navneev@amazon.com>
nknize pushed a commit to opensearch-project/OpenSearch that referenced this issue Feb 3, 2023
#6120)

Fixing the IT for GeoTilesAggregation.

Signed-off-by: Navneet Verma <navneev@amazon.com>
@navneet1v
Copy link
Collaborator

The PR is merged. Closing the github issue.

heemin32 pushed a commit to heemin32/OpenSearch that referenced this issue Jun 28, 2023
opensearch-project#6120)

Fixing the IT for GeoTilesAggregation.

Signed-off-by: Navneet Verma <navneev@amazon.com>
andrross pushed a commit to opensearch-project/OpenSearch that referenced this issue Jun 30, 2023
* Add GeoTile and GeoHash Grid aggregations on GeoShapes. (#5589)

Src files for GeoTile and GeoHash Aggregations on GeoShape with integration
tests.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [opensearch-project/geospatial#212] Fixing the IT for GeoTilesAggrega… (#6120)

Fixing the IT for GeoTilesAggregation.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [#6187, #6222] Fixing the GeoShapes GeoHash and GeoTile Aggregations Integration tests. (#6242)

Changes done:
* Fixed the ArrayIndexOutOfBoundsException.
* Reduced the precision for GeoShapes Aggregation IT testing.

Signed-off-by: Navneet Verma <navneev@amazon.com>

* [#7101] Fixing the GeoTileIT#testMultivaluedGeoPointsAggregation test case. (#7166)

The issue was happening because we encode the GeoPoint as long and error comes in the precision due to that encoding. The error was not taken care while generating the exepected tiles count for execpected output.

Signed-off-by: Navneet Verma <navneev@amazon.com>

---------

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Heemin Kim <heemin@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants