Andreas W (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A4bfd4320-364c-4fcc-8e71-b0a030741764
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-10393?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
) GEOS-10393 (
https://osgeo-org.atlassian.net/browse/GEOS-10393?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
) WFS-T deletes the wrong features (and further BatchManager issues) (
https://osgeo-org.atlassian.net/browse/GEOS-10393?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.19.3, 2.20.2 Assignee: Unassigned
Components: WFS Created: 17/Feb/22 10:59 AM Priority: Highest Reporter: Andreas
W (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A4bfd4320-364c-4fcc-8e71-b0a030741764
)
The newly introduced BatchManager in org.geoserver.wfs.Transaction combines the
filters of multiple Delete operations within one Transaction without
considering the feature type of the Delete. The filters are combined using the
feature type of the first Delete instead.
This is critical because the wrong data might be deleted.
Example:
The following Transaction contains one Delete operation for archsites and one
for bugsites. But BatchManager will combine both filters using OR and execute
them against archsites only.
<wfs:Transaction service= "WFS" version= "1.1.0"
xmlns:cdf = "http://www.opengis.net/cite/data"
xmlns:ogc = "http://www.opengis.net/ogc"
xmlns:wfs = "http://www.opengis.net/wfs"
xmlns:sf = "http://www.openplans.org/spearfish" >
<wfs:Delete typeName= "sf:archsites" >
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName> topp:str1 </ogc:PropertyName>
<ogc:Literal> No Name </ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Delete>
<wfs:Delete typeName= "sf:bugsites" >
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName> topp:str1 </ogc:PropertyName>
<ogc:Literal> Spearfish Creek </ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Delete>
</wfs:Transaction>
There are further issues with BatchManager.
Verified:
* It copies the contents of later Insert and Delete operations into earlier
ones, which is generally Ok. But it leaves the now obsolete later Inserts and
Deletes unchanged in the TransactionRequest. For third party
TransactionListeners the TransactionRequest therefore contains duplicate
contents. Instead the now obsolete later Inserts and Deletes shall be removed
keeping the TransactionRequest consistent. We use such a custom
TransactionListener and this is a big problem for us.
Not verified, just from looking at the code:
* The deleteBatchSize is not working, because the size checking of the filters
is not working. It is always at most one filter present.
* The implementations of org.geoserver.wfs.request.Delete.deleteFilter() are
doing nothing, AFAICS.
I can offer to create a pull request addressing these issues. But I will
probably refactor (rewrite?) BatchManager , because I find it too hard to
understand because of its structure (using fields as parameters, unncesssary
casting and assignments to local variables, etc).
Best regards,
Andreas
(
https://osgeo-org.atlassian.net/browse/GEOS-10393#add-comment?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-10393#add-comment?atlOrigin=eyJpIjoiZmY2ODcyNDYzMTVmNGRjMzkzYTVlMzgwMWMwNTkzOWYiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100192-
sha1:e250074 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel