From: anil <ani...@bt...> - 2007-10-01 16:44:40
|
Hi We're evaluating exist for use on a new project which potentially will have to deal with a large volume of 'writes' & deletes to a collection. To evaluate exist we're using jmeter to run 3 scripts against our collection to try and simulate a high volume. The scripts perform the following: - 1 script (store.xqy) writes a document to the collection - the document takes a number of integer parameters to the script and writes each of these params to a <num> value. The sum of the paramaters is always equal to 20. http://www.nabble.com/file/p12982853/store.xqy store.xqy To provide the params to the script we use the store_param.txt file (attached). http://www.nabble.com/file/p12982853/store_param.txt store_param.txt - 1 script (delete.xqy) deletes a document from the collection (doesn't really matter which doc) http://www.nabble.com/file/p12982853/delete.xqy delete.xqy - 1 script (logic.xqy) adds up all of the <num> elements within *all* of the docs within the collection and divides the overall sum by the number of documents in the collection - the answer should always add up to 20. http://www.nabble.com/file/p12982853/logic.xqy logic.xqy (I've attached all files to this message) When I run jmeter with 4 threads with a delay of 2 secs set in the ramp up period we always receive a value of 20 as the result of our logic.xqy, which is excellent and what we'd expect. When I run jmeter with 4 threads with a delay of 0 seconds in the ramp up period we occassionally get errors where the returned value from logic.xqy isn't 20. In truth we only get 2-3 errors from a result set of about 30, but the errors are still there every time I run the test. As you may see from the logic.xqy file attached, we use the xcollection function to get a snapshot of the collection at a certain point, and perform my calculations on that copy of data. As we're not getting 20 *every time* I was just wondering whether this means that the database has some kind of transactional error? The results imply that as we're not getting 20 every time that the data is not in a consistent state. Does this mean that a delete operation or a write operation is not transactional? Of course I'm very willing to believe that the actual test is flawed rather than exist so I'd really appreciate any advice someone could give me on: (a) the transactionality of exist (I realise that there is no programmer support for transactions, but I understand that 'write' operations are supposed to be atomic through every interface - i.e. REST, webDAV etc, xmldb xquery library)? (b) how we could improve our tests if they are not testing what I think they should? Many thanks, Anil. P.S. Sorry for the rather long post! -- View this message in context: http://www.nabble.com/xcollection-xquery-function---transactions-tf4549488.html#a12982853 Sent from the exist-open mailing list archive at Nabble.com. |