Age | Commit message (Collapse) | Author | Files | Lines |
|
The new read-only record flags make determining if we can use a record
a bit more complex, so extract it into its own function.
The OLD logic was:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it.
The new logic is:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it IF we only
want read-only access, OR there are no read-only delegations.
3) If we are not dmaster, we can only use it if we want read-only
access and it is marked as a read-only copy.
This logic is unused until the next patches which begin to ask
for read-only copies of records.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
we were filling our logs with lock ordering debug lines
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 27 12:50:29 CET 2012 on sn-devel-104
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 18 16:21:52 CET 2012 on sn-devel-104
|
|
|
|
This makes sure we do not deadlock from doing two dbwrap_fetch_locked in two
processes in different orders. At open time, we assign a strict order to all
databases. lock_order 1 will be locked first, lock_order 2 second. No two
records of the same lock order may be locked at the same time.
|
|
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
|
|
|
|
use the TDB ecode to determine the NTSTATUS return value
and not the return code that is just -1
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec 15 17:41:53 CET 2011 on sn-devel-104
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
This is in preparation to remove the db_context->fetch function pointer
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Also, the parser now returns void. The parser is called if and only if
dbwrap_parse_record returns NT_STATUS_OK.
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
Introduce a local variable for the result, replace "state->result" by "result"
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 9 13:37:51 CET 2011 on sn-devel-104
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec 8 16:39:29 CET 2011 on sn-devel-104
|
|
|
|
|
|
We have the private fallback in dbwrap_parse_record anyway
|
|
|
|
|
|
|
|
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 2 20:39:33 CET 2011 on sn-devel-104
|
|
db_record->private_data is for backends which can include dbwrap_private.h
anyway.
|
|
db_tdb_fetch()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov 30 01:46:31 CET 2011 on sn-devel-104
|
|
This implement more correct NTSTATUS handling inside the backends.
This ensures that data.dptr != NULL if return code is NT_STATUS_OK.
|
|
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
persistent dbs
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Oct 14 20:59:37 CEST 2011 on sn-devel-104
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Oct 13 18:50:47 CEST 2011 on sn-devel-104
|
|
This passes down a struct loadparm_context to allow these
parameters to be checked. This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.
Andrew Bartlett
|
|
record in traverse
It did not compare the last charcter (usually '\0')
|
|
Brown paperbag. This omitted the "== 0" hand hence skipped all keys of the
same length as __db_sequence_number__ but different from it...
|
|
Michael, please check.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 15:25:56 CEST 2011 on sn-devel-104
|
|
it was only used by ctdb_replay_transaction and was a actually write only
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 12 05:20:36 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
for consistency and better error propagation
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
|
|
for consistency and better error propagation
|
|
bool)
for consistency and better error propagation
|
|
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
|
|
dbwrap_private.h
The API and callers now only need the forward declarations.
|
|
|
|
|
|
dbwrap_fetch_bystring_upper() to NTSTATUS
|
|
|
|
|