With the new implementation of PropertyDataStore(extending
ContentDataStore), I am getting test failures for most of the Geoserver WFS
Locking tests. I was able to determine that this is being caused by
transactions not correctly releasing their locks, which in turn is caused
by a failure in the DiffTransactionState.commit() method:

In DiffTransactionState.java: line 135-140:

        if (source instanceof ContentFeatureStore) {
            store = (ContentFeatureStore) dataStore.getFeatureSource(name);
            writer = store.getWriter(Filter.INCLUDE);
        } else {
            throw new UnsupportedOperationException("not writable");
        }

Here, we get a writer from ContentFeatureStore. The store is not provided
with a transaction, such that both the store and the writer use
Transaction.AUTO_COMMIT.

When we go to write the data, the call to writer.write() passes through
InProcessLockingManager.assertAccess(), which fails because we are using
Transaction.AUTO_COMMIT rather than the transaction of the
DiffTransactionState

The previous implementation in AbstractDataStore gets around these checks
by using the internal writer (In this case, PropertyFeatureWriter) with no
wrappers, thereby bypassing InProcessLockingManager.

I am currently working on a potential fix for this issue by injecting the
correct transaction into the writer, but any input on the best way to
proceed is welcome.

Torben
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to