Yliu 2012-02-25 18:25:06
I am considering using Berkeley-DB to build a transactional database
on a flash disk within VxWorks. This application is special in that we
only need to read the database at the startup of the system; later on
we only need to write data changes to the database. The BDB manuals
recommend separately store database files and log files in different
hard drives for higher performance, while we only have one flash in
the system. If I make the in-memory buffer large enough to contain the
whole database, will this achieve the similar results as putting
database and logs to diff disks?
Another question about transaction and replication. Suppose I have a
master and a client database env.. Is the replication process also
protected in the same transaction as writing to local disk? Is the
replication to client failed, will the whole transaction fail? Or the
replication can be configured inside the transaction protection and
outside of it?
Bostic 2012-02-25 18:25:15
Berkeley DB only writes to the database files when a checkpoint
is done (see the DbEnv::txn_checkpoint method for more
information), the application specifically requests it (using
the Db::sync or memory cache methods), or when there is
insufficient room in the database cache for the application’s
working set, and pages have to be swapped between the cache and the stable storage.
I don’t understand what you mean by this question, could you
please explain it further?
No. It is not possible to abort transactions after the application’s
send function has been called, as the master may have already written
the commit log records to disk, and so abort is no longer an option.
For more information, please see the “Transactional guarantees”
section of the Berkeley DB Reference Guide, included in your
download package and also available at:
Keith Bostic firstname.lastname@example.org
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com