this is preliminary documentation and can be subject to change.
Whitebear database files are implemented as a container with content
ACID transaction management is implemented in the container layer using multi-version concurrency control. It applies to tables, indexes, BLOBs and schema.
ISAM indexed sequential access method is a principle, a library, and a file format first implemented by IBM in 1973. Whitebear storage engine provide functionalities of IBM's ISAM library, as well as ACID transaction management, on a completely different file format based on B-tree structures.
In order to lower physical I/O operations, every page read from the database file will be retained into memory until the following event occurs:
This cause the disk caching component to allocate large amount of memory in case of heavy system use. There is no built-in limit on the maximum amount of memory allocated for caching. The maximum amount of memory that will be used can be configured through Java virtual machine's -Xmx parameter. And some parameters of the disk cache can be used in order to tune how much time a page will be retained into memory.
data is written to the physical file in an asynchronous manner. Disk cache and physical file will be synchronized on transaction commit.
The database engine allows several versions of the same data to be stored into the database file. Every new transaction will cause a new version number to be generated.
During a transaction, when a data page is updated, a temporary shadow copy of the page will be created and stored into the transaction state.
A vacuum cleaner process check closed transactions, look for temporary copies and make the changes permanent - copy content of shadow copy back to the original page. The vacuum cleaner will also check rollback-ed transaction, remove unused shadow copies and reclaim free space.
version conflict may occurs when trying to commit a transaction that contains outdated shadow copies: if a concurrent transaction has already committed more recent version of the same pages.
the SERIALIZABLE transaction mode enforce transactions to be run in sequence order if needed to avoid version conflict. In this mode time-outs prevents a transaction to be frozen by the serialization process.
Temporary data are made of shadow copies stored into a transaction state that will never be committed.
API reference can be found in javadoc style documents included in folder /javadoc of the package.
Online API reference is available at <http://whitebear.sourceforge.net/javadoc>.