Berkeley
DB 4.3.XX Change Log
Last Updated: $Date: 2004/06/09 10:00:09$
Database or Log File On-Disk Format Changes:
- The on-disk log format has
changed.
New Features:
- Add support for light
weight, transactionally protected Sequence Number generation. [#5739]
- Add support for Degree 2
isolation. [#8689]
- Add election generation
information to replication to support Paxos compliance. [#9068]
- Add support for 64-bit and
ANSI C implementations of the RPCGEN utility. [#9548]
Database Environment Changes:
- Add support for importing
databases from a transactional database environment into a different
environment. [#9324]
- Fix a bug where a core dump could
occur if a zero-length database environment name was specified. [#9233]
- Increase the number of
environment regions to 100. [#9297]
- Remove the
DB_ENV->set_verbose() method flag DB_VERB_CHKPOINT. [#9405]
- Fix bugs where database
environment getters could return incorrect information after the database
environment was opened, if a different thread of control changed the
database environment values.
Fix bugs where database environment getter/setter functions could
race with other threads of control. [#9724]
- Change the
DbEnv.set_lk_detect method to match the DbEnv.open semantics. That is,
DbEnv.set_lk_detect may be called after the database environment is
opened, allowing applications to configure automatic deadlock detection if
it has not yet been configured. [#9724]
- Fix cursor locks for
environments opened without DB_THREAD so that they use the same locker ID.
This eliminates many common cases of application self-deadlock,
particularly in CDS. [#9742]
- Fix a bug in DB->get_env()
in the C API where it could return an error when it should only return the
DB_ENV handle. C++ and Java
are unchanged. [#9828]
- Fix a bug where we only need
to initialize the cryptographic memory region when MPOOL, Log or
Transactions have been configured.
[#9872]
- Change Berkeley DB so
configuring a database environment for automatic log file removal affects
all threads in the environment, not just the DbEnv handle in which the configuration
call is made. [#9947]
- Add a method to create
non-existent intermediate directories when opening database files. [#9898]
- Change the signature of the
error callback passed to the DB_ENV->set_errcall and DB->set_errcall
methods to add a DB_ENV handle, to provide database environment context for
the callback function. [#10025]
- Fix a race condition between
DB->close and DB->{remove,rename} on file systems that don't allow
file operations on open files (such as Windows). [#10180]
- Add a DB_DSYNC_LOG flag to
the DbEnv::set_flags method, which configures O_DSYNC on POSIX systems and
FILE_FLAG_WRITE_THROUGH on Win32 systems. This offers significantly better
performance for some applications on certain Solaris/filesystem
combinations. [#10205]
Concurrent Data Store Changes:
- Fix cursor locks for
environments opened without DB_THREAD so that they use the same locker ID.
This eliminates many common cases of application self-deadlock,
particularly in CDS. [#9742]
General Access Method Changes:
- Fix a bug where Berkeley DB
log cursors would close and re-open the underlying log file each time the
log file was read. [#8934]
- Improve performance of
DB->open() for existing subdatabases maintained within the same
database file. [#9156]
- Add a new error,
DB_BUFFER_SMALL, to differentiate from ENOMEM. The new error indicates
that the supplied DBT is too small. ENOMEM is now always fatal. [#9314]
- Fix a bug when an update
through a secondary index is deadlocked it is possible for the deadlock to
be ignored, resulting in a partial update to the data. [#9492]
- Fix a bug where a record
could get inserted into the wrong database when a page was de-allocated
from one subdatabase and re-allocated to another subdatabase maintained
within the same database file.
[#9510]
- Enhance file allocation so
that if the operating system supports decreasing the size of a file and
the last page of the file is freed, it will be returned to the operating
system. [#9620]
- Fix a bug where
DB_RUNRECOVERY could be returned if there was no more disk space while
aborting the allocation of a new page in a database. [#9643]
- Fix a bug where the
cryptographic code could memcpy too many bytes. [#9648]
- Fix a bug with DB->join()
cursors that resulted in a memory leak and incomplete results. [#9763]
- Disallow cursor delete,
followed a cursor put of the current item across all access methods. [#9900]
- Fix a bug where recovery of
operations on unnamed databases that were never closed, could fail. [#10118]
- Fix a bug where DB->truncate
of a database with overflow records that spanned more than one page would
loop. [#10151]
Btree Access Method Changes:
- Fix a bug where a record
could get placed on the wrong page when two threads are simultaneously
trying to split a four level (or greater) Btree. [#9542]
Hash Access Method Changes:
- Fix a bug where a delete
to a hash database with off page duplicates could fail to have the proper
lock when deleting an off page duplicate tree. [#9585]
- Fix a bug where a dirty
reader using a HASH database would leave a lock on the meta page. [#10105]
Queue Access Method Changes:
- Fix a bug where
DB_CONSUME_WAIT may loop rather than wait for a new record to enter the
queue, if the queue gets into a state where there are only deleted records
between the head and the end of queue. [#9215]
- Fix a bug where a queue
extent file could be closed when it was empty, even if a thread was still
accessing a page from that file. [#9291]
- Fix a bug where
DBC->c_put(key, data, DB_CURRENT) where inserting a new record after
the current record had been deleted was returning DB_KEYEMPTY. [#9314]
- Fix a bug where a Queue
extent file could be reported as not found if a race condition was
encountered between removing the file and writing out a stale buffer. [#9462]
- Fix a bug where the Queue
access method might fail to release a record lock when running without
transactions. [#9487]
- Add DB_INORDER flag for
Queue databases to guarantee FIFO (First In, First Out) ordering when
using DB_CONSUME or DB_CONSUME_WAIT.
[#9689]
- Fix a bug where Queue
access method remove and rename calls could fail with a "Permission
denied" error. [#9775]
- Fix a bug where aborting a
transaction that opened and renamed a queue database using extents could
leave some of the extent files with the wrong name on Windows. [#9781]
- Fix a bug where a db_dump
of a queue database could return an error at the end of the queue if the
head or tail of the queue is the first record on a page. [#10215]
Recno Access Method Changes
- Fix a bug where the
key/data counts returned by the Db->stat method for Recno databases did
not match the documentation. [#8639]
- Fix a bug where
DBC->c_put(key, data, DB_CURRENT) where inserting a new record after
the current record had been deleted was returning DB_KEYEMPTY. [#9314].
C++-specific API Changes:
- Change DbException to extend
std::exception, making it possible for applications to catch all
exceptions in one place. [#10022]
- Fix a bug where errors
during transaction destructors (commit, abort) could cause an invalid
memory access. [#10302]
Java-specific API Changes:
- Fix a bug where the Java
API did not respect non-zero return values from secondaryKeyCreate,
including DB_DONOTINDEX. [#9474]
- Fix a bug where a
self-deadlock occurred with a non-transactional class catalog database
used in a transactional environment.
The bug only occurred when the collections API was not used for
starting transactions. [#9521]
- Improve memory management and
performance when large byte arrays are being passed to DB methods. [#9801]
- Improve performance of
accessing statistics information from the Java API. [#9835]
- Allow Java application to
run without DB_THREAD so they can be used as RPC clients. [#10097]
- Fix a bug where an
uninitialized pointer is dereferenced for logArchive(Db.DB_ARCH_REMOVE).
[#10225]
Tcl-specific API Changes:
None.
RPC-specific Client/Server Changes:
- Add support for 64-bit and
ANSI C implementations of the RPCGEN utility. [#9548]
- Fix a small memory leak in
RPC clients. [#9595]
- Fix a bug in the RPC server
to avoid self-deadlock by always setting DB_TXN_NOWAIT. [#10181]
Replication Changes:
- Add an Environment ID to
distinguish between clients from different replication groups. [#7786]
- Add “number of votes
required” and “flags” parameters to
DB_ENV->rep_elect() method. [#7812]
- Fix a bug where a client's
env_openfiles pass could start with the wrong LSN. This could result in
very long initial sync-up times for clients joining a replication group.
[#8635]
- Add election generation
information to replication to support Paxos compliance. [#9068]
- Remove support for logs-only
replication clients. Use of
the DB_REP_LOGSONLY flag to the DB_ENV->rep_start() method should be
replaced with the DB_REP_CLIENT flag. [#9331]
- Fix a bug where replication
clients fail to lock all the necessary pages when applying updates when
there are more than one database in the transaction. [#9569]
- Fix a bug in replication
elections where when elections are called by multiple threads the wrong
master could get elected.
[#9770]
- Fix a bug where the master
could get a DB_REP_OUTDATED error. Instead send an OUTDATED message to the
client. [#9881]
- Modify replication timestamp
so that non-replication client applications can get a DB_REP_HANDLE_DEAD.
[#9986]
XA Resource Manager Changes:
None.
Locking Subsystem Changes:
- Fix a bug where a deadlock
of an upgrade from a dirty read to a write lock during an aborted
transaction, may not be detected. [#7143]
- Add support for Degree 2
isolation. [#8689]
- Change the system to return
DB_LOCK_DEADLOCK if a transaction attempts to get new locks after it has
been selected as the deadlock victim. [#9111]
- Fix a bug where when configured
to support dirty reads, a writer may not downgrade a write lock as soon as
possible, potentially blocking dirty readers. [#9197]
- Change the test-and-set
mutex implementation to avoid interlocked instructions when we know the
instruction is unlikely to succeed.
[#9204]
- Fix a bug where a thread
supporting dirty readers can get blocked while trying to get a write lock.
It will allocate a new lock rather than using an existing WAS_WRITE lock
when it becomes unblocked, causing the application to hang. [#10093]
Logging Subsystem Changes:
- Fix a bug where aborting a
transaction with a file open in it could result in an unrecoverable log
file. [#9636]
- Fix a bug where recovery would
not return a fatal error if the transaction log was corrupted. [#9841]
- Fix a bug in recovery so
that the final checkpoint no longer tries to flush the log. This will
permit recovery to complete even if there is no disk space to grow the log
file. [#10204]
- Improve performance of log
flushes by pre-allocating log files and using fdatasync() in preference to
fsync(). [#10228]
Memory Pool Subsystem Changes:
- Fix a bug in the MPOOLFILE
file_written flag value so that checkpoint doesn't repeatedly open, flush
and sync files in the cache for which there are no active application
handles. [#9529]
Transaction Subsystem Changes:
- Fix a bug where the same
transaction ID could get allocated twice if you wrapped the transaction ID
space twice and then had a very
old transaction. [#9036]
- Fix a bug where a
transaction abort that contained a page allocation could loop if the file
system was full. [#9461]
- Fix implementation of
DB->get_transactional() to match documentation: there is no possibility
of error return, only 0 or 1. [#9526]
- Fix a bug where re-setting
any of the DB_TXN_NOSYNC, DB_TXN_NOT_DURABLE and DB_TXN_WRITE_NOSYNC flags
could fail to clear previous state, potentially leading to incorrect
transactional behavior in the application. [#9947]
Utility Changes:
- Add debugging and
performance tuning information to db_stat. Add new Berkeley DB handle methods
to output debugging and performance tuning information to a C library FILE
handle (C and C++ APIs only). [#9204]
- Fix a bug where db_stat
could drop core if DB->open fails and no subdatabase was
specified. [#9273]
- Add command-line arguments
to the db_printlog utility to restrict the range of log file records that
are displayed. [#9307]
- Fix a bug in the locking
statistics where “current locks” included failed lock
requests. [#9314]
- Fix a bug where db_archive
would remove all log files when --enable-diagnostic and DB_NOTDURABLE were
both specified. [#9459]
- Fix a bug where db_dump with
the “-r” flag would output extra copies of the subdatabase
information. [#9808]
- Fix a bug in db_archive that
would cause log file corruption if the application had configured the
environment with DB_PRIVATE.
[#9841]
- Add support in db_load for
resetting database LSNs and file IDs without having to re-load the
database. [#9916]
Configuration, Documentation, Portability and Build Changes:
- Add pread and pwrite to the
list of system calls applications can replace at run-time. [#8954]
- Add support for UTF-8
encoding of filenames on Windows. [#9122]
- Remove C++ dependency on
snprintf. Compilers on HPUX
10.20 are missing header file support for snprintf(). [#9284]
- Change Berkeley DB to not
use the open system call flag O_DIRECT, unless DB configured using
--enable-o_direct. [#9298]
- Fix several problems with
mutex alignment on HP/UX
10.20. [#9404]
- Fix a memory leak when
HAVE_MUTEX_SYSTEM_RESOURCES is enabled. [#9546]
- Fix a bug in the sec002.tcl
test for binary data. [#9626]
- Fix a bug where filesystem
blocks were not being zeroed out in the On-Time embedded Windows OS. [#9640]
- Fix build problems with the
Java API in Visual Studio .NET 2003.
[#9701]
- Add support for the gcc
compiler on the Opteron platform.
[#9725]
- Add support for the
small_footprint build option for VxWorks. [#9820]
- Add support for linking of
DLLs with MinGW. [#9957]