Harmony/Dalvik IdentityHashMap Issue affecting Berkeley DB Java Edition on Android

While debugging a failing JE unit test issue on Android, I ran into an interesting bug with the Harmony implementation of IdentityHashMap on Dalvik (the Android runtime).

It seems that if you call IdentityHashMap.entrySet() you get back Map.Entry instances which do not actually allow mutation of the underlying IdentityHashMap. Down in the guts of the Checkpointer code we use IHM to create a mapping from DatabaseImpls (internal database handles) to "the highest level" in the INDirtyList (the list of Internal Nodes in memory). We use that mapping to determine how high in the tree we should flush during a "flushAll" checkpoint. This failure means that there could be potential issues with Internal Nodes not being flushed when we think they are (Android only).

While we can't get the Dalvik runtime fixed for a while (i.e. it will require a new release of Android), we can put in a workaround (the details still TBD) to our code. This will appear in the next release of JE 4.0.x.

Comments:

Thanks Charles. Bug raised as https://issues.apache.org/jira/browse/HARMONY-6419 Great to see BerkleyDB JE getting some love on Android.

Posted by Tim Ellison on January 13, 2010 at 08:52 PM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Anything related to Oracle NoSQL Database and/or Berkeley DB Java Edition.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today