-
Notifications
You must be signed in to change notification settings - Fork 190
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
Incorrect Feature count on WFS Queries from HBase #1365
Comments
Thanks @worky68 for this good supporting documentation along with the issue. Apologies for not following up immediately, the developers were pushing hard to get 0.9.8 released and now we're going to investigate this prior to 1.0.0. |
after investigating, I believe this is a bug in 0.9.4 related to how we cache statistics results in HBase that no longer exists. We currently cache statistics results only associated by appropriate authorizations. We also have fairly involved testing with visibility/auth but I noticed for our primary integration test we use a Count Aggregation rather than a statistic. I added to that test t o also verify statistics are using proper authorization in PR #1429 ... thanks for the feedback, in that it helped bulk up our testing. Please re-open if by chance I am mistaken and you find this still to be an issue in 0.9.8, but I am fairly confident this was resolved. |
Thanks @rfecher! We are planning to upgrade to 1.0.0 in the future. |
We have created an HBase Datastore in Geoserver using the GeoWave plugin. We then make requests using the WFS service in Geoserver to this Datastore. Inside of this Datastore we have ingested a number of SimpleFeatures with row visibility set. In addition, we have our own implementation of AuthorizationSPI that we use to filter results.
Expected Behavior
We expect the WFS numOfFeatures attribute to reflect the number of features returned with the current response.
Actual Behavior
The WFS numOfFeatures attribute reflects the total number of features within the Datastore regardless of the authorizations provided. However, the features returned in the resulting featurecollection are correct in terms of the authorizations provided.
Workaround
The problem seems to stem from two places within the code that prefer a cached count over the actual count. As a workaround to the issue, we have removed the code below.
geowave/extensions/adapters/vector/src/main/java/mil/nga/giat/geowave/adapter/vector/plugin/GeoWaveFeatureCollection.java
Lines 71 to 87 in e9d9966
geowave/extensions/adapters/vector/src/main/java/mil/nga/giat/geowave/adapter/vector/plugin/GeoWaveFeatureSource.java
Lines 120 to 126 in e9d9966
After removing the code we are now receiving the proper count on our queries. Of course, sacrificing some efficiency.
Specifications
The text was updated successfully, but these errors were encountered: