Content-Type: multipart/mixed; boundary=Apple-Mail-7--833291206 --Apple-Mail-7--833291206 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
I guess I somehow got it = in my head that jdbm was focussed on having a single-file datastore = (likely not based on its docs, etc., but chattering message boards, = etc).

The notion of log files being only for = transient storage is pretty consistent in some of the embedded DBs I = happen to have used (sqlite and [god help me] access), although = obviously derby has a multitude of files.

The = use case is simply that I'm looking at jdbm to provide a user-facing = datastore, so having a single file is a big deal in terms of ease of = backup, user familiarity, etc.  Having the synchronizeLog method = there certainly gets the job done.

Regarding = the compile errors, they're only in the NetBeans IDE (v6.7 FWIW), not in = the actual build (I think NB is just being a little pickier about = generics stuff than javac is).  I've attached a patch file from svn = diff (not sure why it produced such a noisy diff on the first = change...).


- = Chas

On Aug 13, 2009, at 5:54 PM, Kevin Day = wrote:

I'm puzzled about the perceived = importance of writing stuff to the db file...  commit() in = berkleydb, for example, certainly doesn't flush the write from the log = to the data file - commit is what actually writes to the log (heck, = berkleydb uses way more than 2 files).  Same goes for non-embedded = dbs like MySQL, SQL Server, etc...  Whether data gets written to = file A or file B really shouldn't matter, and I don't think it would be = a good idea for a client application to be trying to determine when data = should be moved from file B into file A.  Here's another way to = think about it:  the .db and .lg files together comprise the = persistent database store.  You can't use one without the = other.  How data is transferred between them is an implementation = detail of the database - not something a client app should be involved = in at all.
What specific use case do you have = in mind where it would be appropriate or advantageous for the client = code to force the database to move data from the log file into the db = file?  Perhaps if I can understand the use-case, I can provide some = more clarification.
I'm not = seeing any compile errors in the HEAD code from SVN.  Are you = looking at the correct repository?  https://jdbm.=
- = K

= --Apple-Mail-7--833291206 Content-Disposition: attachment; filename=generics-nb-errors.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="generics-nb-errors.patch" Content-Transfer-Encoding: 7bit Index: src/test/java/jdbm/btree/ =================================================================== --- src/test/java/jdbm/btree/ (revision 35) +++ src/test/java/jdbm/btree/ (working copy) @@ -3,6 +3,7 @@ import; import; import java.util.Collections; +import java.util.Comparator; import java.util.Random; import jdbm.RecordManager; @@ -52,18 +53,18 @@ @Before public void setUp() throws Exception { - TestCaseWithTestFile.deleteTestFile(); + TestCaseWithTestFile.deleteTestFile(); recman = RecordManagerFactory.createRecordManager( TestCaseWithTestFile.testFileName ); - btree = BTree.createInstance(recman, Collections.reverseOrder()); + btree = BTree.createInstance(recman, (Comparator)Collections.reverseOrder()); System.err.println(recman.getClass()); - } + } - @After + @After public void tearDown() throws Exception { - recman.close(); - TestCaseWithTestFile.deleteTestFile(); - } - + recman.close(); + TestCaseWithTestFile.deleteTestFile(); + } + @Test public void testWriter() throws Exception { testConcurrent(); Index: src/main/java/jdbm/helper/ =================================================================== --- src/main/java/jdbm/helper/ (revision 35) +++ src/main/java/jdbm/helper/ (working copy) @@ -197,13 +197,13 @@ * would have experienced while evicting an object it currently * cached. */ - public void put(K key, V value, boolean dirty, Serializer ser) throws CacheEvictionException { + public void put (K key, V value, boolean dirty, Serializer ser) throws CacheEvictionException { if (key == null) { throw new IllegalArgumentException("key cannot be null."); } else if (value == null) { throw new IllegalArgumentException("value cannot be null."); } - _internal.put(key, value, dirty, ser ); + _internal.put(key, value, dirty, ser); removeClearedEntries(); _cacheMap.put(key, new Entry(key, value, /*dirty, ser,*/ _clearQueue)); _ninserts++; --Apple-Mail-7--833291206 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: 7bit