I found a serious bug in the BDB storage engine in trunk when testing
compatibility with our prior store data. The BDB option
setSortedDuplicates had been removed in trunk (which means we couldn't
open older stores). The effect of this is that only the latest version
of a key/value would be retained in trunk. This is a corner case, but
it is necessary for it to be handled correctly to get the correct
The unit tests did not catch this problem because the code path is
slightly different (something which should be fixed).
I have re-added this option. Note that this means that data created in
BDB store with recent versions will not allow sorted duplicates. To
make sure that these stores can still be opened and used correctly I
added the server.properties option "bdb.enable.sorted.duplicates",
setting it to false will retain the current (buggy) behavior.
So if you have existing data stored in a recent trunk version you will
want to set this to false to retain the current behavior, but all new
uses should not set anything so that they do not experience this
problem in the first place.
If your BDB setting does not match your store data you will get the
error "Exception in thread "main" java.lang.IllegalArgumentException:
You can't open a Database with a sortedDuplicates configuration of
true if the underlying database was created with a sortedDuplicates
setting of false."