1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

20 Commits

Author SHA1 Message Date
Volker Lendecke
5c6944d33f s3: Remove a pointless #endif/#ifdef pair 2009-10-22 16:33:44 +02:00
Jeremy Allison
d942d248d6 Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly. For the clustering case.
Clustered setups should have only ever used
the unsigned version of TDB_DATA in the
first place so they can't be in this mess :-).
Just do the normal upgrade in the clustered case.
Jeremy.
2009-03-27 12:13:13 -07:00
Volker Lendecke
9475e88bea Add dbwrap->parse_record
Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Stefan Metzmacher
535311d187 s3:dbwrap: add dbwrap_delete(), dbwrap_store() and dbwrap_fetch()
The _bystring function are now just tiny wrappers.

metze
2009-01-19 17:06:03 +01:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Andrew Tridgell
89dc729443 ensure we give an error code to any routines above that are looking
for one
(This used to be commit 469ba9b871)
2008-08-12 21:37:01 +02:00
Michael Adam
fc6216b2da dbwrap: don't panic in db_open_trans() if called with TDB_CLEAR_IF_FIRST.
return NULL instead and leave appropriated measures to the caller.

Michael
(This used to be commit 1002507b56)
2008-07-15 16:43:26 +02:00
Michael Adam
3899851af0 dbwrap: don't panic in db_open_trans() when attaching to ctdb fails.
Michael
(This used to be commit 308fc7d5bf)
2008-07-15 15:27:46 +02:00
Michael Adam
5a8b0fe99f dbwrap: don't panic in db_open() when attaching to ctdb fails.
Michael
(This used to be commit b9c008d9bd)
2008-07-15 15:27:14 +02:00
Michael Adam
56681032b2 dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open_trans.
Michael
(This used to be commit 013d29c704)
2008-07-15 13:55:33 +02:00
Michael Adam
32df537a24 dbwrap: when clustering = yes, don't fall back to db_open_tdb in db_open
Michael
(This used to be commit 33188a991f)
2008-07-15 13:55:26 +02:00
Volker Lendecke
313abd3ac2 Fix the build of db_open_trans with CLUSTER_SUPPORT enabled
Metze, you might want to check this.
(This used to be commit 3b4a402bc5)
2008-04-14 13:13:46 +02:00
Stefan Metzmacher
138b58bcec dbwrap: use db_open_tdb2() in for db_open_trans() if "dbwrap:use_tdb2=yes"
For clustered setups you need to disable the ctdb backend for each
tdb which should use the tdb2 backend (e.g. ctdb:registry.tdb=no).

To disable tdb2 per tdb use something like "tdb2:passdb.tdb=no"

metze
(This used to be commit 5cea2bf367)
2008-04-12 09:14:09 +02:00
Stefan Metzmacher
474916b70c dbwrap: add db_open_trans()
This should be used when transactions are wanted.
For now it's just a wrapper of db_open(), but this
will change.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 74a070b8a2)
2008-03-27 18:14:56 +01:00
Alexander Bokovoy
68694369fc Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbb)
2008-01-16 12:09:48 +03:00
Volker Lendecke
94a354493a Add dbwrap bystring service routines
(This used to be commit 1e214b536b)
2007-12-10 16:06:32 +01:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
de565785f5 r23410: Merge the core of the cluster code.
I'm 100% certain I've forgotten to merge something, but the main code
should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and
messages_ctdbd.c.

There should be no changes to the non-cluster case, it does survive make
test on my laptop.

It survives some very basic tests with ctdbd enables, I did not do the
full test suite for clusters yet.

Phew...

Volker
(This used to be commit 15553d6327)
2007-10-10 12:23:14 -05:00
Volker Lendecke
4c185a6077 r22775: For the cluster code I've developed a wrapper around tdb to put different
database backends in place dynamically.

The main abstractions are db_context and db_record, it should be mainly
self-describing, see include/dbwrap.h.  You open the db just as you would open
a tdb, this time with db_open(). If you want to fetch a record, just do the
db->fetch() call, if you want to do operations on it, you need to get it with
fetch_locked().

I added dbwrap_file.c (not heavily tested lately) as an example for what can
be done with that abstraction, uses a file per key. So if anybody is willing
to shape that up, we might have a chance on reiserfs again.... :-)

This abstraction works fine for brlock.tdb, locking.tdb, connections.tdb and
sessionid.tdb. It should work fine for the others as well, I just did not yet
get around to convert them.

If nobody loudly screams NO, then I will import the code that uses this soon.

Volker
(This used to be commit e9d7484ca2)
2007-10-10 12:21:56 -05:00