From: <tho...@us...> - 2010-08-23 17:44:07
|
Revision: 3457 http://bigdata.svn.sourceforge.net/bigdata/?rev=3457&view=rev Author: thompsonbry Date: 2010-08-23 17:44:01 +0000 (Mon, 23 Aug 2010) Log Message: ----------- Updated the javadoc to emphasize that the Direct and Mapped BufferModes are not under development and should not be used. Turned off the test suite for the Direct BufferMode. Modified Paths: -------------- trunk/bigdata/src/java/com/bigdata/journal/BufferMode.java trunk/bigdata/src/test/com/bigdata/journal/TestAll.java Modified: trunk/bigdata/src/java/com/bigdata/journal/BufferMode.java =================================================================== --- trunk/bigdata/src/java/com/bigdata/journal/BufferMode.java 2010-08-21 01:16:12 UTC (rev 3456) +++ trunk/bigdata/src/java/com/bigdata/journal/BufferMode.java 2010-08-23 17:44:01 UTC (rev 3457) @@ -59,15 +59,16 @@ Transient(false/* stable */, true/* fullyBuffered */), /** + * <strong>This mode is not being actively developed and should not be used + * outside of unit tests.</strong> * <p> - * A direct buffer is allocated for the file image. Writes are applied - * to the buffer. The buffer tracks dirty slots regardless of the - * transaction that wrote them and periodically writes dirty slots - * through to disk. On commit, any dirty index or allocation nodes are - * written onto the buffer and all dirty slots on the buffer. Dirty - * slots in the buffer are then synchronously written to disk, the - * appropriate root block is updated, and the file is (optionally) - * flushed to disk. + * A direct buffer is allocated for the file image. Writes are applied to + * the buffer. The buffer tracks dirty slots regardless of the transaction + * that wrote them and periodically writes dirty slots through to disk. On + * commit, any dirty index or allocation nodes are written onto the buffer + * and all dirty slots on the buffer. Dirty slots in the buffer are then + * synchronously written to disk, the appropriate root block is updated, and + * the file is (optionally) flushed to disk. * </p> * <p> * This option offers wires an image of the journal file into memory and @@ -79,6 +80,9 @@ Direct(true/* stable */, true/* fullyBuffered */), /** + * <strong>This mode is not being actively developed and should not be used + * outside of unit tests. Memory mapped IO has the fatal weakness under Java + * that you can not reliably close or extend the backing file.</strong> * <p> * A memory-mapped buffer is allocated for the file image. Writes are * applied to the buffer. Reads read from the buffer. On commit, the map is Modified: trunk/bigdata/src/test/com/bigdata/journal/TestAll.java =================================================================== --- trunk/bigdata/src/test/com/bigdata/journal/TestAll.java 2010-08-21 01:16:12 UTC (rev 3456) +++ trunk/bigdata/src/test/com/bigdata/journal/TestAll.java 2010-08-23 17:44:01 UTC (rev 3457) @@ -93,7 +93,25 @@ suite.addTest( TestTransientJournal.suite() ); - suite.addTest( TestDirectJournal.suite() ); + /* + * Commented out since this mode is not used and there is an occasional + * test failure in: + * + * com.bigdata.journal.TestConcurrentJournal.test_concurrentReadersAreOk + * + * This error is stochastic and appears to be restricted to + * BufferMode#Direct. This is a journal mode based by a fixed capacity + * native ByteBuffer serving as a write through cache to the disk. Since + * the buffer can not be extended, that journal mode is not being + * excercised by anything. If you like, I can deprecate the Direct + * BufferMode and turn disable its test suite. (There is also a "Mapped" + * BufferMode whose tests we are not running due to problems with Java + * releasing native heap ByteBuffers and closing memory mapped files. + * Its use is strongly discouraged in the javadoc, but it has not been + * excised from the code since it might be appropriate for some + * applications.) + */ +// suite.addTest( TestDirectJournal.suite() ); /* * Note: The mapped journal is somewhat problematic and its tests are This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |