From: Wolfgang M. M. <wol...@us...> - 2004-06-08 08:16:53
|
Update of /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29485/src/org/dbxml/core/filer Modified Files: BTree.java Log Message: * Resolved concurrency conflicts when accessing a collection: avoid dirty reads on the old document while it is being replaced. * The index settings specified in the configuration are now also applied to reindexed document fragments during an XUpdate. * Removed unnecessary data from org.exist.dom.DocumentImpl to reduce its in memory size. * Deferred addition of new documents to collection: when adding a large number of documents, keeping the actual document objects in memory slows down the indexing process. Class Collection now just remembers the document name, not the object itself. Index: BTree.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/dbxml/core/filer/BTree.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** BTree.java 4 Jun 2004 09:42:19 -0000 1.26 --- BTree.java 8 Jun 2004 08:16:09 -0000 1.27 *************** *** 156,167 **** Runnable syncAction = new Runnable() { public void run() { ! try { ! // LOG.debug("Triggering cache sync for " + getFile().getName()); ! lock.acquire(Lock.WRITE_LOCK); ! cache.flush(); ! } catch (LockException e) { ! LOG.warn("Failed to acquire lock on dom.dbx"); ! } finally { ! lock.release(); } } --- 156,169 ---- Runnable syncAction = new Runnable() { public void run() { ! if(cache.hasDirtyItems()) { ! try { ! // LOG.debug("Triggering cache sync for " + getFile().getName()); ! lock.acquire(Lock.WRITE_LOCK); ! cache.flush(); ! } catch (LockException e) { ! LOG.warn("Failed to acquire lock on dom.dbx"); ! } finally { ! lock.release(); ! } } } |