If the data source is PostGIS, when WFS-T batch deletes more than 30 features in a single transaction, the Geoserver has no response. The WFS-T request would be timeout, and the features would not be deleted.<br>
Test method is as follows:<br>
- create database table:<br>
BEGIN;
CREATE TABLE "public"."facilities" ( "feat_id" VARCHAR(80), CONSTRAINT "facilities_pk" PRIMARY KEY ("feat_id") );
SELECT AddGeometryColumn('public','facilities','geometry',4326,'POINT',2);
CREATE INDEX "facilities_geometry_geom_idx" ON "public"."facilities" USING GIST ("geometry");
ALTER TABLE "public"."facilities" ADD COLUMN "feat_type" NUMERIC(18,0);
ALTER TABLE "public"."facilities" ADD COLUMN "sub_type" NUMERIC(18,0);
ALTER TABLE "public"."facilities" ADD COLUMN "desc" VARCHAR(80);
COMMIT;
- publish a Layer on the Geoserver, the configuration is as follows:<br>
workspace name: postgres<br>
namespace URI: http://geoserver/postgres <br>
datastore name: public<br>
datastore Linked database public schemas<br>
Enable preparedStatements<br>
layer name: public.facilities<br>
- insert 30 features:<br>
The format of the request is as follows, and the full request is attached.‘insert_request.xml’<br>
<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<Insert idgen="UseExisting">
<public.facilities xmlns="http://geoserver/postgres" fid="1">
<geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
<pos srsDimension="2">122.05334646900725 31.503026716605195</pos>
</Point>
</geometry>
</public.facilities>
</Insert>
<Insert idgen="UseExisting">
<public.facilities xmlns="http://geoserver/postgres" fid="2">
<geometry>
<Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
<pos srsDimension="2">122.05334646900725 31.503026716605195</pos>
</Point>
</geometry>
</public.facilities>
</Insert>
</Transaction>
- delete 30 features:<br>
The format of the request is as follows, and the full request is attached.‘delete_request.xml’<br>
<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<Delete typeName="feature:public.facilities" xmlns:feature="http://geoserver/postgres">
<Filter xmlns="http://www.opengis.net/ogc">
<FeatureId fid="1"/>
</Filter>
</Delete>
<Delete typeName="feature:public.facilities" xmlns:feature="http://geoserver/postgres">
<Filter xmlns="http://www.opengis.net/ogc">
<FeatureId fid="2"/>
</Filter>
</Delete>
</Transaction>
and then, Geoserver has no response.<br>
I’ve tried these things:<br>
- Inserts and updates don’t have this problem.<br>
- When the data source is Shapefile, don’t have this problem.<br>
|