You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Arjé Cahn <Ar...@hippo.nl> on 2002/04/18 12:47:05 UTC

Ashok's problem: J2EE Version Slide testing

Ashok Kumar wrote:
>We are still investigating these issues with a view to providing a patch, but would be interested in knowing if any others have hit similar issues.
Ashok,
We are experiencing the same problems in our Slide implementation. We use an HSql database as descriptor store and XMLdb (Xindice) the content. Currently, we run a SQL statement on the HSql database to remove all double entries once in a while. A patch would make me very happy!

Regards,

Arjé Cahn


---------------------------------------------------------
Content Management Department
Hippo Webworks
Grasweg 35
1031 HW Amsterdam
The Netherlands
Tel  +31 (0)20 6345173 
Fax +31 (0)20 6345179
arje(at)hippo(dot)nl / www.hippo.nl

--------------------------------------------------------------

Hi All,

We have built a test scenario for the new J2EE Stores and include some
observations below. Would be
interested in any feedback on these.

The test case we have used is a multi-threaded WebDAV client. The
program creates (n) number of simultaneous
threads to put the same file within the same directory structure on the
WebDAV server (saved as different file
names within that structure).=20

MKCOL         - if target collection does not exist it is  created.
PUT              - local file is put into target location as with thread
number appended to make n
                       separate files.
PROPPATCH - two properties are added for each file.

The test program was run against last Friday's (2002-03-08) slide CVS
running under Tomcat 4.0.4-b1.
Datasource handling via Tyrex.

First observation is that under this version of Tomcat, slide would not
load throwing HeuristixMixedExceptions.
This was solved as per the transaction guidelines by removing commits
and rollbacks from the J2EEStore.java
code.

Moreover, Tyrex threw an exception trying to close a Statement which has
been already closed. We commented
out the statement.close() in the J2EE store.

After making these changes, slide started correctly.

Next the test program described above was run and displayed 2 problems:

1. Multi-User Problem

   Simultaneous threads led to the creation of more than one directory
and/or file (with the same name)
   under the same parent. Shown using MS Internet Explorer to view the
directory content via the
   WebDAVServlet.


   This happens consistently and can happen at any directory level in
the PUT. This problem also causes
   windows Explorer to stop functioning as a WebDav client due to
multiple directories with the same
   name.

   Although multiple files are shown in the listing, each link points to
the same file.

   The reason this happens is that multiple rows are present in the
CHILDREN table, while the
   REVISIONCONTENT table has the correct number of file content rows.

   On inspecting J2EEDescriptorStore.java, it is noted that a Vector is
used to access the currently
   existing children for a particular node. During storing of these
children, entries in the CHILDREN
   table are first deleted for a particular node (ragardless of what
other processes may have
   concurrently added children to that node) and the Vector which
contains the previously existing
   children + the new entries to be added is then re-inserted.

   Therefore, in our case with multiple threads PUTting simultaneously
each thread's Vector is becoming out
   of date depending when it is populated compared to the state of other
threads. This is causing
   duplicate insertions of children.

   A possible fix for this is to add a unique  constraint/index on
CHILDREN(URI,CHILDURI) to cause
   an Exception on a duplicate insert. However, there may be issues in
doing this depending on the
   database used.

   The same effect can be demonstrated using the standard JDBC store
with concurrent access. So this
   problem is not restricted to J2EE implementations.


2. Cacheing Problem?

   There may also be a problem with cacheing which shows up in an
Internet Explorer (WebDAVServlet)
   view of the store.

   Running the test program with 10 threads and  _simultaneously_
looking with Internet Explorer at
   the file listing, we can see each file appearing as stored in by each
thread on refreshing.

   However, if we refresh our Internet Explorer view multiple times
quickly we do not see all the files
   that we know have been added.

   We know the files are stored as we can access them directly by their
URI, but they never appear in the
   list of children until after slide is re-started.

   We have confirmed that there are no database deadlocks casuing this
issue.

   Using the SQLServer Profiler we note that after this condition is
reached no queries are triggereed to
   select the children from the database, so we assume the cache is not
being correctly marked as dirty.


We are still investigating these issues with a view to providing a
patch, but would be interested in knowing
if any others have hit similar issues.=20

Ashok Kumar
Metatomix Inc



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>