> From: "Sander Striker" <striker@apache.org>
>
> 5) DB could do a better job of logging appends -- that is, if when using
> partial record writing, it detects that the piece being written does not
> overlap with what is already in the row, it need only log the NEW data,
> not the old data + the new data. We no longer need this, but it was a
> major problem that caused us to take a different route.
The Berkeley DB Btree access method has code to avoid logging
data if just the prefix or suffix of a record has changed, and
I thought that it was supposed to catch pure appends as well.
One of our engineers ran the appended test, and Berkeley DB
appears to do the right thing on an append, that is, it is
only logging the appended data. If you can give us a more
specific case where data appends log unnecessary information,
I'm happy to pursue this further.
Regards,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
Sleepycat Software Inc. bostic@sleepycat.com
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
% source ../test/test.tcl
% berkdb env -create -home TESTDIR -txn
env0
% berkdb open -env env0 -auto_commit -create -btree foo.db
db0
% db0 put -auto_commit a a
0
% env0 txn
env0.txn0
% db0 cursor -txn env0.txn0
db0.c0
% db0.c0 get -first
{a a}
% db0.c0 put -current -partial {1 2} bb
0
% db0.c0 close
0
% env0.txn0 commit
[1][8746]__db_debug: rec: 47 txnid 80000003 prevlsn [0][0]
op: db_put0
fileid: 0
key: a
data: a
arg_flags: 0
[1][8803]__db_debug: rec: 47 txnid 80000003 prevlsn [1][8746]
op: db_c_put0
fileid: 0
key: a
data: a
arg_flags: 18
[1][8862]__db_addrem: rec: 41 txnid 80000003 prevlsn [1][8803]
opcode: 1
fileid: 0
pgno: 1
indx: 0
nbytes: 4
hdr:
dbt: a
pagelsn: [1][0]
[1][8927]__db_addrem: rec: 41 txnid 80000003 prevlsn [1][8862]
opcode: 1
fileid: 0
pgno: 1
indx: 1
nbytes: 4
hdr:
dbt: a
pagelsn: [1][8862]
[1][8992]__txn_regop: rec: 10 txnid 80000003 prevlsn [1][8927]
opcode: 1
timestamp: 1026334740
[1][9028]__db_debug: rec: 47 txnid 80000004 prevlsn [0][0]
op: db_c_get0
fileid: 0
key:
data:
arg_flags: 11
[1][9085]__db_debug: rec: 47 txnid 80000004 prevlsn [1][9028]
op: db_c_put0
fileid: 0
key:
data: bb
arg_flags: 9
[1][9144]__bam_repl: rec: 58 txnid 80000004 prevlsn [1][9085]
fileid: 0
pgno: 1
lsn: [1][8927]
indx: 1
isdeleted: 0
orig:
repl: bb
prefix: 1
suffix: 0
[1][9214]__txn_regop: rec: 10 txnid 80000004 prevlsn [1][9144]
opcode: 1
timestamp: 1026341445
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 11 03:59:47 2002