In attemting to provide the writer with the correct transaction, I ran into
a number of test failures relating to transaction independance. While I
have not thoroughly traced these failures, this suggests that using the
same method as AbstractDataStore (an unwraped internal writer) may be the
best course.

Torben

On Mon, Jan 5, 2015 at 4:16 PM, Torben Barsballe <
tbarsba...@boundlessgeo.com> wrote:

> 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