JDBC FeatureWriter remove skips

Description

From JDBCFeatureStore ....

FeatureWriter writer = getDataStore().getFeatureWriter(typeName,
filter, getTransaction());
Feature feature;

try {
while (writer.hasNext())
{
feature = writer.next();
writer.remove();
}
} finally
{
writer.close();
}

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:34 PM

CodeHaus Comment From: jgarnett - Time: Thu, 5 Feb 2004 15:00:46 -0600
---------------------
This is blocking developement on Strong Transaction Support.

Do we have any idea what is wrong with this one? Last we let off I think it was stuck behind QueryData next().

TO be clear this only happens with the FeatureType is in the following form: attrb1, attrb2, ..., GeometryAttrib, attrb N;

Everything works fine for: attrb1, ... attrb N, GeomtryAttrib;

That is to say this occurs when we have several AttributeIO spans in the same FeatureRead. This is easy to force by placing a geometry column in the middle of your attributes (usually postgis appends Geometry columns at the end so this bug does not appear).

A couple of tests to try:

Hand construct a Feature with three AttributeTypeIO spans (rather than two as tested) and see if we skip every three rows.

Also note: the exact same code seems to work on Oracle, so we may be in some kind of differences between JDBC drivers here, or we may not have performed the same test (multiple attributeIO spans) in Oracle.

We may need to assign this to someone other than Chris, as progress is needed, and I think he is short of time these days?

Comments (and Ideas) please.

codehaus
April 10, 2015, 3:34 PM

CodeHaus Comment From: cholmes - Time: Thu, 5 Feb 2004 15:14:05 -0600
---------------------
EXTERNAL MESSAGE:

SUBJECT: Re: [jira] Updated: (<a href="https://jira.codehaus.org/browse/GEOT-75" title="JDBC FeatureWriter remove skips" class="issue-link" data-issue-key="GEOT-75"><strike>GEOT-75</strike></a>) JDBC FeatureWriter remove skips

Yeah, I&#39;m a bit short on time, best to reassign it. If it only appears

with geometry rows in odd places then it seems like it would have to be a

problem with the calling of next.

codehaus
April 10, 2015, 3:34 PM

CodeHaus Comment From: jgarnett - Time: Thu, 5 Feb 2004 16:21:59 -0600
---------------------
I need to be able to trust the FeatureWrtier before I can proceed.

Please note that having the FeatureWriter broken on remove - is really bad. The use of an optimized FeatureSource has hidden this bug from GeoServer - but we cannot pretend that the PostgisDataStore is working

at the moment.

If a user tries to use the low-level api (or even the non optimized FeatureSource) they will run into our inconsistent FeatureWriter.

codehaus
April 10, 2015, 3:34 PM

CodeHaus Comment From: aaime - Time: Sat, 24 Apr 2004 11:02:40 -0500
---------------------
This bug has been solved in fid_exp. It is due to a bug into the jdbc driver I think, and I&#39;ve solved by opening the result set in read only mode and creating explicit queries for delete and update (explicit ones for insert where already there)

codehaus
April 10, 2015, 3:34 PM

CodeHaus Comment From: jgarnett - Time: Mon, 4 Oct 2004 16:17:45 -0500
---------------------
Andrea&#39;s fid-exp fixed this ages ago.

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Highest
Configure