diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-15 14:04:22 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-15 14:04:22 -0700 |
commit | 46c99ec2a3781d53138245182345c6c2ddd9a258 (patch) | |
tree | 6f799fa2989ef02851e9034c07c4dcbb68a8e183 /lib/tdb/common | |
parent | e44c4141fdfa07bb3bd09f28e5f093d27f170dc8 (diff) | |
download | samba-46c99ec2a3781d53138245182345c6c2ddd9a258.tar.gz samba-46c99ec2a3781d53138245182345c6c2ddd9a258.tar.bz2 samba-46c99ec2a3781d53138245182345c6c2ddd9a258.zip |
tdb: allow reads after prepare commit
We previously only allowed a commit to happen after a prepare
commit. It is in fact safe to allow reads between a prepare and a
commit, and the s4 replication code can make use of that, so allow it.
Diffstat (limited to 'lib/tdb/common')
-rw-r--r-- | lib/tdb/common/transaction.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index e97fe67b4e..67a035879c 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -137,14 +137,6 @@ static int transaction_read(struct tdb_context *tdb, tdb_off_t off, void *buf, { uint32_t blk; - /* Only a commit is allowed on a prepared transaction */ - if (tdb->transaction->prepared) { - tdb->ecode = TDB_ERR_EINVAL; - TDB_LOG((tdb, TDB_DEBUG_FATAL, "transaction_read: transaction already prepared, read not allowed\n")); - tdb->transaction->transaction_error = 1; - return -1; - } - /* break it down into block sized ops */ while (len + (off % tdb->transaction->block_size) > tdb->transaction->block_size) { tdb_len_t len2 = tdb->transaction->block_size - (off % tdb->transaction->block_size); |