1<!--$Id: 4.7.html,v 1.38 2008/05/15 21:13:24 carol Exp $-->
2<html>
3<head>
4<title>The Berkeley DB Package: DB 4.7.25 Change Log</title>
5<meta name="description" content="Berkeley DB: A database programmatic toolkit.">
6<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods">
7</head>
8<body bgcolor=white>
9
10<h3 align=center>Berkeley DB 4.7.25 Change Log</h3>
11<h3>Database or Log File On-Disk Format Changes:</h3>
12    <ol>
13        <li>The log file format changed in 4.7.&nbsp; </li>
14    </ol>
15
16<h3>New Features:</h3>
17<ol>
18
19<li>The lock manager may now be fully partitioned, improving performance
20on some multi-CPU systems. [#15880]
21    <li>Replication groups are now architecture-neutral, supporting
22connections between differing architectures (big-endian or
23little-endian, independent of structure padding). [#15787] [#15840] </li>
24    <li>Java: A new Direct Persistence Layer adds a built-in Plain Old Java Object (POJO)-based
25        persistent object model, which provides support for complex object models without
26        compromises in performance. For an introduction to the Direct Persistence Layer
27        API, see Getting Started with Data Storage. [#15936] </li>
28    <li>Add the DB_ENV-&gt;set_intermediate_dir_mode method to support the
29creation of intermediate directories needed during recovery. [#15097] </li>
30<li>The DB_ENV-&gt;failchk method can now abort transactions for threads,
31which have failed while blocked on a concurrency lock.  This
32significantly decreases the need for database environment recovery after
33thread of control failure.  [#15626]
34<li>Replication Manager clients now can be configured to monitor the
35connection to the master using heartbeat messages, in order to promptly
36discover connection failures. [#15714]
37<li>The logging system may now be configured to pre-zero log files when
38they are created, improving performance on some systems. [#15758]
39
40</ol>
41<h3>Database Environment Changes:</h3>
42<ol>
43
44<li>Restructure aborted page allocation handling on systems without an
45ftruncate system call.  This enables the Berkeley DB High Availability
46product on systems, which do not support ftruncate. [#15602]
47<li>Fix a bug where closing a database handle after aborting a
48transaction which included a failed open of that handle could result in
49application failure. [#15650]
50<li>Fix minor memory leaks when closing a private database environment.
51[#15663]
52<li>Fix a bug leading to a panic of "unpinned page returned" if a cursor
53was used for a delete multiple times and deadlocked during one of the
54deletes. [#15944]
55<li>Optionally signal processes still running in the environment before running
56recovery. [#15984]
57
58</ol>
59<h3>Concurrent Data Store Changes:</h3>
60
61None.
62
63<h3>General Access Method Changes:</h3>
64<ol>
65
66<li>Fix a bug where closing a database handle after aborting a
67transaction which included a failed open of that database handle could
68result in application failure. [#15650]
69<li>Fix a bug that could cause panic in a database environment
70configured with POSIX-style thread locking, if a database open failed.
71[#15662]
72<li>Fix bug in the DB-&gt;compact method which could cause a panic if a
73thread was about to release a page while another thread was truncating
74the database file.  [#15671]
75        <li>Fix an obscure case of interaction between a cursor scan and delete that was prematurely
76            returning DB_NOTFOUND. [#15785]</li>
77<li>Fix a bug in the DB-&gt;compact method where if read-uncommitted was
78configured, a reader reading uncommitted data my see an inconsistent
79entry between when the compact method detects an error and when it
80aborts the enclosing transaction. [#15856]
81<li>Fix a bug in the DB-&gt;compact method where a thread of control
82mail fail if two threads are compacting the same section of a Recno
83database. [#15856]
84<li>Fix a bug in DB-&gt;compact method, avoid an assertion failure when zero pages
85can be freed. [#15965]
86<li>Fix a bug return a non-zero error when DB-&gt;truncate is called with open cursors. 
87[#15973]
88<li>Fix a bug add HANDLE_DEAD checking for DB cursors. [#15990]
89<li>Fix a bug to now generate errors when DB_SEQUENCE-&gt;stat is called without
90first opening the sequence. [#15995]
91    <li>Fix a bug to no longer dereference a pointer into a hash structure, when hash functionality
92        is disabled.&nbsp; [#16095]</li>
93
94</ol>
95<h3>Btree Access Method Changes:</h3>
96
97None.
98
99<h3>Hash Access Method Changes:</h3>
100<ol>
101
102<li>Fix a bug where a database store into a Hash database could
103self-deadlock in a database environment configured for the Berkeley DB
104Concurrent Data Store product, and with a free-threaded DB_ENV or DB
105handle. [#15718]
106
107</ol>
108<h3>Queue Access Method Changes:</h3>
109<ol>
110
111<li>Fix a bug that could cause a put or delete of a queue element to
112return a DB_NOTGRANTED error, if blocked. [#15933]
113
114</ol>
115<h3>Recno Access Method Changes:</h3>
116
117<ol>
118
119<li>Expose db_env_set_func_malloc, db_env_set_func_realloc, and 
120db_env_set_func_free through the Windows API for the DB dll. [#16045]
121
122</ol>
123
124<h3>C-specific API Changes:</h3>
125
126None.
127
128<h3>Java-specific API Changes:</h3>
129<ol>
130
131<li>Fix a bug where enabling MVCC on a database through the Java API was
132ignored. [#15644]
133<li>Fixed memory leak bugs in error message buffering in the Java API.
134[#15843]
135<li>Fix a bug where Java SecondaryConfig was not setting SecondaryMultiKeyCreator from
136the underlying db handle [OTN FORUM}
137<li>Fix a bug so that getStartupComplete will now return a boolean instead of an int.
138[#16067]
139<li>Fix a bug in the Java API, where Berkeley DB would hang on exit when using replication. [#16142]</li>
140
141</ol>
142<h3>
143    Direct Persistence Layer (DPL), Bindings and Collections API:</h3>
144    <ol>
145
146<li>A new Direct Persistence Layer adds a built-in Plain Old Java Object (POJO)-based
147    persistent object model, which provides support for complex object models without
148    compromises in performance. For an introduction to the Direct Persistence Layer
149    API, see Getting Started with Data Storage. [#15936]</li>
150        <li>&nbsp;Fixed a bug in the remove method of the Iterator instances returned by the
151            StoredCollection.iterator method in the collections package. This bug caused ArrayIndexOutOfBoundsException
152            in some cases when calling next, previous, hasNext or hasPrevious after calling
153            remove. (Note that this issue does not apply to StoredIterator instances returned
154            by the StoredCollection.storedIterator method.) This bug was reported in this forum
155            thread:
156            <br />
157            <a class="moz-txt-link-freetext" href="http://forums.oracle.com/forums/thread.jspa?messageID=2187896">
158                http://forums.oracle.com/forums/thread.jspa?messageID=2187896</a>
159            <br />
160            [#15858] </li>
161        <li>Fixed a bug in the remove method of the StoredIterator instances returned by StoredCollection.storedIterator
162            method in the collections package. If the sequence of methods next-remove-previous
163            was called, previous would sometimes return the removed record. If the sequence
164            of methods previous-remove-next was called, next would sometimes return the removed
165            record. (Note that this issue does not apply to Iterator instances returned by the
166            StoredCollection.iterator method.) [#15909] </li>
167        <li>Fixed a bug that causes a memory leak for applications where many Environment objects
168            are opened and closed and the CurrentTransaction or TransactionRunner class is used.
169            The problem was reported in this JE Forum thread: <a class="moz-txt-link-freetext"
170                href="http://forums.oracle.com/forums/thread.jspa?messageID=1782659">http://forums.oracle.com/forums/thread.jspa?messageID=1782659</a>
171            [#15444] </li>
172        <li>Added StoredContainer.areKeyRangesAllowed method.&nbsp; Key ranges and the methods
173            in SortedMap and SortedSet such as subMap and subSet are now explicitly disallowed
174            for RECNO and QUEUE databases -- they are only supported for BTREE databases.&nbsp;
175            Before, using key ranges in a RECNO or QUEUE database did not work, but was not
176            explicitly prohibited in the Collections API. [#15936] </li>
177    </ol>
178    <h3>
179        Tcl-specific API Changes:</h3>
180<ol>
181
182<li>The Berkeley DB Tcl API does not attempt to avoid evaluating input
183as Tcl commands. For this reason, it may be dangerous to pass unreviewed
184user input through the Berkeley DB Tcl API, as the input may
185subsequently be evaluated as a Tcl command. To minimize the
186effectiveness of a Tcl injection attack, the Berkeley DB Tcl API in the
1874.7 release routine resets process' effective user and group IDs to the
188real user and group IDs. [#15597]
189
190</ol>
191<h3>RPC-specific Client/Server Changes:</h3>
192
193None.
194
195<h3>Replication Changes:</h3>
196<ol>
197
198<li>Fix a bug where a master failure resulted in multiple attempts to
199perform a "fast election"; subsequent elections, when necessary, now use
200the normal nsites value. [#15099]
201<li>Replication performance enhancements to speed up failover. [#15490]
202<li>Fix a bug where replication could self-block in a database environment
203configured for in-memory logging.  [#15503]
204<li>Fix a bug where replication would attempt to read log file version
205numbers in a database configured for in-memory logging. [#15503]
206<li>Fix a bug where log files were not removed during client
207initialization in a database configured for in-memory logging. [#15503]
208<li>The 4.7 release no longer supports live replication upgrade from the
2094.2 or 4.3 releases, only from the 4.4 and later releases. [#15602]
210<li>Fix a bug where replication could re-request missing records on
211every arriving record. [#15629]
212<li>Change the DB_ENV-&gt;rep_set_request method to use time, not the
213number of messages, when re-requesting missed messages on a replication
214client. [#15629]
215<li>Fix a minor memory leak on the master when updating a client during
216internal initialization. [#15634]
217<li>Fix a bug where a client error when syncing with a new replication
218group master could result in an inability to ever re-join the group. [#15648]
219      <li>Change dbenv-&gt;rep_set_request to use time-based values instead of counters. [#15682]</li>
220<li>Fix a bug where a LOCK_NOTGRANTED error could be returned from the
221DB_ENV-&gt;rep_process_message method, instead of being handled
222internally by replication. [#15685]
223<li>Fix a bug where the Replication Manager would reject a fresh
224connection from a remote site that had crashed and restarted, displaying
225the message: "redundant incoming connection will be ignored". [#15731]
226<li>The Replication Manager now supports dynamic negotiation of the best
227available wire protocol version, on a per-connection basis.  [#15783]
228<li>Fix a bug, which could lead to slow performance of internal
229initialization under the Replication Manager, as evidenced by "queue limit
230exceeded" messages in verbose replication diagnostic output. [#15788]
231<li>Fix a bug where replication control message were not portable between
232replication clients with different endian architectures. [#15793]
233<li>Add a configuration option to turn off Replication Manager's special
234handling of elections in 2-site groups. [#15873]
235<li>Fix a bug making it impossible to call replicationManagerAddRemoteSite
236in the Java API after having called replicationManagerStart. [#15875]
237<li>Fix a bug where the DB_EVENT_REP_STARTUPDONE event could be
238triggered too early.  [#15887]
239    <li>Fix a bug where the rcvd_ts timestamp is reset when the user just changes the threshold.
240        [#15895]</li>
241<li>Fix a bug where the master in a 2-site replication group might wait
242for client acknowledgement, even when there was no client connected.
243[#15927]
244<li>Fix a bug, clean up and restart internal init if master log is gone.
245 [#16006]
246 <li>Fix a bug, ignore page messages that are from an old internal init. 
247 [#16075] [#16059]
248      <li>Fix a bug where checkpoint records do not indicate a database was a named in-memory
249          database. [#16076]</li>
250      <li>Fix a bug with in-memory replication, where we returned with the log region mutex
251          held in an error path, leading to self-deadlock. [#16088]</li>
252            <li>Fix a bug which causes the DB_REP_CHECKPOINT_DELAY setting in rep_set_timeout()
253                to be interpreted in seconds, rather than microseconds. [#16153]</li>
254
255</ol>
256<h3>XA Resource Manager Changes:</h3>
257<ol>
258
259<li>Fix a bug where the DB_ENV-&gt;failchk method and replication in
260general could fail in database environments configured for XA. [#15654]
261
262</ol>
263<h3>Locking Subsystem Changes:</h3>
264<ol>
265
266<li>Fix a bug causing a lock or transaction timeout to not be set
267properly after the first timeout triggers on a particular lock id.
268[#15847]
269
270<li>Fix a bug that would cause a trap if DB_ENV-&gt;lock_id_free was passed an
271invalid locker id. [#16005]
272
273<li>Fix a bug when thread tracking is enabled where an attempt is made to 
274release a mutex that is not lock. [#16011]
275</ol>
276<h3>Logging Subsystem Changes:</h3>
277<ol>
278<li>Fix a bug, handle zero-length log records doing HA sync with
279in-memory logs. [#15838]
280<li>Fix a bug that could cause DB_ENV-&gt;failcheck to leak log region
281memory. [#15925]
282<li>Fix a bug where the abort of a transaction that opened a database
283could leak log region memory. [#15953]
284<li>Fix a bug that could leak memory in the DB_ENV-&gt;log_archive interface if
285a log file was not found. [#16013]
286
287</ol>
288<h3>Memory Pool Subsystem Changes:</h3>
289<ol>
290      <li>Fix multiple MVCC bugs including a race, which could <b>result in
291incorrect data being returned</b> to the application. [#15653] </li>
292<li>Fixed a bug that left an active file in the buffer pool after a
293database create was aborted. [#15918]
294<li>Fix a bug where there could be uneven distribution of pages if a single database
295and multiple cache regions are configured. [#16015]
296<li>Fix a bug where DB_MPOOLFILE-&gt;set_maxsize was dropping the wrong
297mutex after open. [#16050] 
298
299</ol>
300<h3>Mutex Subsystem Changes:</h3>
301<ol>
302
303<li>Fix a bug where mutex contention in database environments configured
304for hybrid mutex support could result in performance degradation.
305[#15646]
306<li>Set the DB_MUTEX_PROCESS_ONLY flag on all mutexes in private environments,
307they can't be shared and so we can use the faster, intra-process only mutex 
308implementations [#16025]
309<li>Fix a bug so that mutexes are now removed from the environment signature if
310mutexes are disabled. [#16042]
311
312</ol>
313<h3>Transaction Subsystem Changes:</h3>
314<ol>
315
316<li>Fix a bug that could cause a checkpoint to selfblock attempting to
317flush a file, when the file handle was closed by another thread during
318the flush. [#15692]
319<li>Fix a bug that could cause DB_ENV-&gt;failcheck to hang if there
320were pending prepared transactions in the environment. [#15925]
321      <li>Prepared transactions will now use the sync setting from the environment.&nbsp;
322          Default to flushing the log on commit (was nosync). [#15995]</li>
323      <li>If __txn_getactive fails, we now return with the log region mutex held.&nbsp; This
324          is not a bus since __txn_getactive cannot really fail.&nbsp; [#16088]</li>
325
326</ol>
327<h3>Utility Changes:</h3>
328
329<ol>
330
331<li>Update db_stat with -x option for mutex stats
332              <li>Fix an incorrect assumption about buffer size when getting an overflow page in db_verify.&nbsp;
333                  [#16064]</li>
334</ol>
335
336<h3>Configuration, Documentation, Sample Application, Portability and Build Changes:</h3>
337<ol>
338
339<li>Fix an installation bug where the Berkeley DB PHP header file was
340not installed in the correct place.
341<li>Merge the run-time configuration sleep and yield functions. [#15037]
342<li>Fix Handle_DEAD and other expected replication errors in the
343C++ sample application ReqQuoteExample.cpp. [15568]
344<li>Add support for monotonic timers. [#15670]
345<li>Fix bugs where applications using the db_env_func_map and
346db_env_func_unmap run-time configuration functions could not join
347existing database environments, or open multiple DB_ENV handles for a
348single environment. [#15930]
349<li> Add documentation about building Berkeley DB for VxWorks 6.x.
350<li>Remove the HAVE_FINE_GRAINED_LOCK_MANAGER flag, it is obsolete in 4.7.
351<li>Fix a bug in ex_rep, add a missing break which could cause a segment fault.</li>
352    <li>Fix build warnings from 64 bit Windows build. [#16029]</li>
353<li>Fix an alignment bug on ARM Linux.&nbsp; Force the assignment to use memcpy.&nbsp;
354                  [#16125]</li>
355      <li>Fix a bug in the Windows specific code of ex_sequence.c, where there was an invalide
356          printf specifier.&nbsp; [#16131]</li>
357      <li>Improve the timer in ex_tpcb to use high resolution timers.&nbsp; [#16154]</li>
358    <li>Mention in the documentation that env-&gt;open() requires DB_THREAD to be specified when using repmgr.
359        [#16163]</li>
360    <li>Disable support for mmap on Windows CE.&nbsp; The only affect is that we do not
361        attempt to mmap small read only databases into the mpool. [#16169]</li>
362
363</ol>
364</body>
365</html>
366