Forum Stats

  • 3,768,732 Users
  • 2,252,842 Discussions
  • 7,874,701 Comments

Discussions

JE intermediate changes

Greybird-Oracle
Greybird-Oracle Member Posts: 2,690
edited Jul 28, 2006 6:39PM in Berkeley DB Java Edition
JE users,

The JE development team would like to make you aware of a set of changes that have been made since the 3.0.12 release. If these changes contain fixes that are important for you to obtain before the next major release, please send an email to [email protected] and we will send you the intermediate release. In particular, there have been several bug fixes to the Direct Persistence Layer beta release that may be helpful to you if you are DPL user. The list of changes is below.

To all who reported problems in the DPL beta release -- thank you!

Mark

General Environment Changes

1. When an Error (OutOfMemoryError, for example) is thrown during database operations, invalidate the Environment so that RunRecoveryException will be thrown if further operations are attempted. [#14300](3.0.36)

2. Fix a bug that caused a NullPointerException when Database.sync() was called on a newly created, empty deferred-write database. [#14781](3.0.20)

3. Fix a bug that caused a NullPointerException in the cleaner thread when running under a JDK1.6 beta. [#14877](3.0.36)

4. Added a new Environment configuration parameter: je.adler32.chunkSize. This may be configured to prevent OutOfMemoryError in some situations. The Java Adler32 algorithm, used by JE for checksumming, allocates direct memory. The amount of direct memory allocated at one time can be reduced by setting a chunk size. Note that Adler32 memory allocation is not known to cause OutOfMemory on Java 1.6, only on Java 1.5 and earlier. [#14149](3.0.36)

Direct Persistence Layer

1. Fix a bug that prevented opening a read-only store when a primary key sequence was used. [#14941](3.0.36)

2. Fix a bug that prevented using EntityJoin with read-uncommitted (for example, CursorConfig.READ_UNCOMMITTED). The fix is a change to JE secondary databases that allows a partial DatabaseEntry to be passed as the data parameter to a search method, when using read-uncommitted. [#14966] (3.0.36)

3. Fix a bug in EntityStore.getStoreNames() which resulted in this stack trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: -9
at java.lang.String.substring(Unknown Source)
at com.sleepycat.persist.impl.Store.getStoreNames(Store.java:209)
at
com.sleepycat.persist.EntityStore.getStoreNames(EntityStore.java:186)
[#14978](3.0.36)

4. Fix a bug that caused an IllegalArgumentException when calling EntityStore.getSecondaryIndex for a @SecondaryKey that was declared on a superclass of the entity class. [#14978](3.0.36)

5. Also note that if @SecondaryKey is used on a field in a subclass of an entity class, EntityStore.getSecondaryIndex will currently fail. A fix for this problem will be in a subsequent release. A workaround is to register the class containing the secondary key before opening the store. For example:

/* Create the model explicitly and register the subclasses */
EntityModel model = new AnnotationModel();
model.registerClass(Manager.class);

/* Use the model to configure the store */
StoreConfig storeConfig = new StoreConfig();
storeConfig.setAllowCreate(true);
storeConfig.setModel(model);
EntityStore store = new EntityStore(..., storeConfig);

See also this newsgroup post describing the problem and a future fix: http://groups.google.com/group/comp.databases.berkeley-db/browse_thread/thread/3359a0c7d6cd6d25?hl=en

Comments

  • 524806
    524806 Member Posts: 30
    According to this:

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6186200

    ...the underlying JVM bug that causes the Adler32 issue has been fixed in pre 1.6 maintenance releases 1.3.1_17, 1.4.2_11, and 1.5.0_07. My once-reliably reproduction test no longer triggers the problem in the 1.5.0_07 JVM.
This discussion has been closed.