From: <tho...@us...> - 2010-08-06 15:10:04
|
Revision: 3421 http://bigdata.svn.sourceforge.net/bigdata/?rev=3421&view=rev Author: thompsonbry Date: 2010-08-06 15:09:58 +0000 (Fri, 06 Aug 2010) Log Message: ----------- Reconciled a merge conflict that I had missed in the comments block. Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-08-06 15:02:44 UTC (rev 3420) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-08-06 15:09:58 UTC (rev 3421) @@ -201,20 +201,6 @@ * @author <a href="mailto:tho...@us...">Bryan Thompson</a> * @version $Id$ * -<<<<<<< .working -======= - * @todo Checksums and/or record compression are currently handled on a per- - * {@link BTree} or other persistence capable data structure basis. It is - * nice to be able to choose for which indices and when ( {@link Journal} - * vs {@link IndexSegment}) to apply these algorithms. However, it might - * be nice to factor their application out a bit into a layered api - as - * long as the right layering is correctly re-established on load of the - * persistence data structure. In that view the {@link IRawStore} either - * computes checksums or it does not and the checksums is stored in the - * record, perhaps in the last 4 bytes. The checksum itself would not be - * visible at the {@link IRawStore} API layer. - * ->>>>>>> .merge-right.r3391 * @todo There are lots of annoying ways in which asynchronously closing the * journal, e.g., using {@link #close()} or {@link #shutdown()} can cause * exceptions to be thrown out of concurrent threads. It would be nice if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2010-11-04 20:59:35
|
Revision: 3898 http://bigdata.svn.sourceforge.net/bigdata/?rev=3898&view=rev Author: thompsonbry Date: 2010-11-04 20:59:28 +0000 (Thu, 04 Nov 2010) Log Message: ----------- code formatting. Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-11-04 20:26:49 UTC (rev 3897) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-11-04 20:59:28 UTC (rev 3898) @@ -2633,12 +2633,14 @@ assertCanWrite(); - ((RWStrategy)_bufferStrategy).delete(addr, context); + ((RWStrategy) _bufferStrategy).delete(addr, context); } - public void detachContext(IAllocationContext context) { - ((RWStrategy)_bufferStrategy).detachContext(context); + public void detachContext(final IAllocationContext context) { + + ((RWStrategy) _bufferStrategy).detachContext(context); + } final public long getRootAddr(final int index) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2010-11-11 13:41:14
|
Revision: 3929 http://bigdata.svn.sourceforge.net/bigdata/?rev=3929&view=rev Author: thompsonbry Date: 2010-11-11 13:41:06 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Modified to do nothing is the backing buffer is an RWStore. The RWStore can not be shrunk on the disk since it stores the meta-allocation information at the end of the file. Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-11-11 09:48:06 UTC (rev 3928) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2010-11-11 13:41:06 UTC (rev 3929) @@ -59,7 +59,6 @@ import com.bigdata.btree.Checkpoint; import com.bigdata.btree.IIndex; import com.bigdata.btree.IndexMetadata; -import com.bigdata.btree.IndexSegment; import com.bigdata.btree.ReadOnlyIndex; import com.bigdata.cache.ConcurrentWeakValueCache; import com.bigdata.cache.ConcurrentWeakValueCacheWithTimeout; @@ -1390,6 +1389,11 @@ * Note: The caller MUST have exclusive write access to the journal. When * the {@link ConcurrencyManager} is used, that means that the caller MUST * have an exclusive lock on the {@link WriteExecutorService}. + * <p> + * Note: The {@link BufferMode#DiskRW} does NOT support this operation. This + * is because it stores meta-allocation information at the end of the file, + * which makes it impossible to shrink the file. Therefore this method will + * return without causing the file on disk to be shrunk for the RWStore. */ public void truncate() { @@ -1400,6 +1404,16 @@ final IBufferStrategy backingBuffer = getBufferStrategy(); + switch (backingBuffer.getBufferMode()) { + case DiskRW: + /* + * Operation is not supported for the RWStore. + */ + return; + default: + break; + } + final long oldExtent = backingBuffer.getExtent(); final long newExtent = backingBuffer.getHeaderSize() + backingBuffer.getNextOffset(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |