From: <mar...@us...> - 2010-12-17 15:05:12
|
Revision: 4012 http://bigdata.svn.sourceforge.net/bigdata/?rev=4012&view=rev Author: martyncutcher Date: 2010-12-17 15:05:06 +0000 (Fri, 17 Dec 2010) Log Message: ----------- Relax session address checking to allow read on any transient bit - either session protected or committed. Resolves problem reading committed CommitRecords from CommitRecordIndex Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java 2010-12-16 14:28:33 UTC (rev 4011) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java 2010-12-17 15:05:06 UTC (rev 4012) @@ -113,9 +113,14 @@ final int bit = offset % allocBlockRange; - if (RWStore.tstBit(block.m_live, bit) - || (m_sessionActive && RWStore.tstBit(block.m_transients, bit))) - { +// if (RWStore.tstBit(block.m_live, bit) +// || (m_sessionActive && RWStore.tstBit(block.m_transients, bit))) + /* + * Just check transients since there are case (eg CommitRecordIndex) + * where committed data is accessed even if has been marked as ready to + * be recycled after the next commit + */ + if (RWStore.tstBit(block.m_transients, bit)) { return RWStore.convertAddr(block.m_addr) + ((long) m_size * bit); } else { return 0L; Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2010-12-16 14:28:33 UTC (rev 4011) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2010-12-17 15:05:06 UTC (rev 4012) @@ -1253,9 +1253,9 @@ readLock.lock(); - assertOpen(); // check again after taking lock + try { + assertOpen(); // check again after taking lock - try { // length includes space for the checksum if (length > m_maxFixedAlloc) { try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |