From: Wolfgang M. M. <wol...@us...> - 2004-07-19 13:06:34
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25772/src/org/exist/storage/store Modified Files: DOMFile.java Log Message: Fixed another locking issue which led to dirty reads if one thread tried to read index data from elements.dbx while another thread had been updating exactly the same data pages. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** DOMFile.java 12 Jul 2004 17:19:53 -0000 1.40 --- DOMFile.java 19 Jul 2004 13:06:25 -0000 1.41 *************** *** 48,52 **** import org.exist.storage.cache.Cacheable; import org.exist.storage.cache.ClockCache; - import org.exist.storage.cache.LRDCache; import org.exist.util.ByteConversion; import org.exist.util.Lock; --- 48,51 ---- *************** *** 791,794 **** --- 790,794 ---- } } while (parentPointer == KEY_NOT_FOUND); + final long firstChildId = XMLUtil.getFirstChildId(doc, id); final Iterator iter = new NodeIterator(lock, this, node.doc, *************** *** 1218,1223 **** public String debugPages(DocumentImpl doc) { StringBuffer buf = new StringBuffer(); ! buf.append("Pages used by ").append(doc.getFileName()); ! buf.append(':'); long pnum = StorageAddress.pageFromPointer(((NodeImpl)doc.getFirstChild()).getInternalAddress()); while(-1 < pnum) { --- 1218,1223 ---- public String debugPages(DocumentImpl doc) { StringBuffer buf = new StringBuffer(); ! buf.append("Pages used by ").append(doc.getName()); ! buf.append("; docId ").append(doc.getDocId()).append(':'); long pnum = StorageAddress.pageFromPointer(((NodeImpl)doc.getFirstChild()).getInternalAddress()); while(-1 < pnum) { *************** *** 1490,1501 **** return null; } ! // LOG.debug( ! // owner.toString() ! // + ": tid " ! // + targetId ! // + " not found on " ! // + page.page.getPageInfo() ! // + ". Loading " ! // + pageNr + "; contents: " + debugPageContents(page)); } return null; --- 1490,1501 ---- return null; } ! LOG.debug( ! owner.toString() ! + ": tid " ! + targetId ! + " not found on " ! + page.page.getPageInfo() ! + ". Loading " ! + pageNr + "; contents: " + debugPageContents(page)); } return null; |