From: Wolfgang M. M. <wol...@us...> - 2004-08-03 15:26:12
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8244/src/org/exist/storage/store Modified Files: CollectionStore.java DOMFile.java Log Message: Revised collection locking to fix various concurrency errors. It is now the responsibility of the caller to lock/unlock a collection. A collection can be retrieved and locked via the new openCollection() method provided by DBBroker. After reading/modifying the collection, it should be unlocked by calling Collection.release. The local XML:DB implementation and the XMLRPC interface have been changed to reflect the new collection locking rules. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** DOMFile.java 28 Jul 2004 18:54:56 -0000 1.43 --- DOMFile.java 3 Aug 2004 15:25:59 -0000 1.44 *************** *** 1192,1200 **** public void removeAll(long p) { ! // StringBuffer debug = new StringBuffer(); ! // debug.append("Removed pages: "); long pnum = StorageAddress.pageFromPointer(p); while(-1 < pnum) { ! // debug.append(' ').append(pnum); DOMPage page = getCurrentPage(pnum); pnum = page.getPageHeader().getNextDataPage(); --- 1192,1200 ---- public void removeAll(long p) { ! StringBuffer debug = new StringBuffer(); ! debug.append("Removed pages: "); long pnum = StorageAddress.pageFromPointer(p); while(-1 < pnum) { ! debug.append(' ').append(pnum); DOMPage page = getCurrentPage(pnum); pnum = page.getPageHeader().getNextDataPage(); *************** *** 1213,1217 **** } } ! // LOG.debug(debug.toString()); } --- 1213,1217 ---- } } ! LOG.debug(debug.toString()); } Index: CollectionStore.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/CollectionStore.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CollectionStore.java 4 Jun 2004 09:47:25 -0000 1.5 --- CollectionStore.java 3 Aug 2004 15:25:59 -0000 1.6 *************** *** 8,21 **** import java.io.File; - import org.exist.collections.CollectionCache; import org.exist.storage.BrokerPool; public class CollectionStore extends BFile { - // size of the internal buffer for collection objects - public static final int COLLECTION_BUFFER_SIZE = 128; - - private CollectionCache collectionsCache = new CollectionCache(COLLECTION_BUFFER_SIZE); - /** * @param file --- 8,15 ---- *************** *** 26,33 **** super(pool, file, btreeBuffers, dataBuffers); } - - public CollectionCache getCollectionCache() { - return collectionsCache; - } --- 20,23 ---- |