From: Wolfgang M. M. <wol...@us...> - 2004-07-12 17:17:50
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32480/src/org/exist/storage/cache Modified Files: ClockCache.java Log Message: Various concurrency-related bug fixes: * there has been a conflicting access to the owner property in class DOMFile: in some cases, a second thread set the property to itself while another thread has been in the process of writing data. As the owner object is used to determine the current page in the document, the writing thread used a wrong data page (for a very short period). Thus, one or two document nodes got lost. * a number of small caching problems in dom.dbx led to inconsistencies in the db. Also, queries using string-equality comparisons did not use the cache, so increasing the cache size had no positive effect on query speed. Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ClockCache.java 21 Jun 2004 15:27:36 -0000 1.17 --- ClockCache.java 12 Jul 2004 17:17:41 -0000 1.18 *************** *** 99,103 **** old.sync(); } - // System.out.println(old.getKey() + " -> " + item.getKey()); items[bucket] = item; map.put(item.getKey(), item); --- 99,102 ---- *************** *** 111,114 **** --- 110,114 ---- Cacheable item = (Cacheable) map.get(key); if (item == null) { + // LOG.debug("Page " + key + " not found in cache"); fails++; } else *************** *** 132,135 **** --- 132,136 ---- if (cacheable == null) return; + // LOG.debug("Removing from cache: " + key); for (int i = 0; i < count; i++) { if (items[i] != null && items[i].getKey() == key) { *************** *** 194,197 **** public void setFileName(String fileName) { } - } --- 195,197 ---- |