Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixup callers to tdb_parse_record() to be compatible with tdb2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
These don't exist in tdb2. The former is used in one weird place in
tdb1, and the latter not at all.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Since TDB2 functions return the error directly, tdb_errorstr() taken an
error code, not the tdb as it does in TDB1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
TDB2 returns a negative error number on failure. This is compatible
if we always check for < 0 instead of == -1.
Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
TDB2 returns void here. tdb_transaction_cancel will *always* return
with the transaction cancelled, but it will complain via the log
function if a transaction wasn't in progress.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
TDB2 returns a negative error number on failure. This is compatible
if we always check for != 0 instead of == -1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
TDB2 returns a negative error number on failure. This is compatible
if we always check for != 0 instead of == -1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This is a noop for tdb1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
CLEAR_IF_FIRST only works if *all* openers use that flag.
So just truncate the file: it's racy, but that's what we're doing anyway.
We'd really need a TDB_OPENCHECK_OR_CLEAR flag to do this properly (or in
TDB2, a open hook at the right point).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Guenther
|
|
|
|
Guenther
|
|
Guenther
|
|
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 22 15:08:30 CET 2010 on sn-devel-104
|
|
|
|
|
|
|
|
TDB_CLEAR_IF_FIRST tdb's. For tdb's like gencache where we open
without CLEAR_IF_FIRST and then with CLEAR_IF_FIRST if corrupt
this is still safe to use as if opening an existing tdb the new
hash will be ignored - it's only used on creating a new tdb not
opening an old one.
Jeremy.
|
|
This avoids the thundering herd problem when 5000 smbds exit simultaneously
because the network went down.
|
|
This reverts commit 5ca63676dc59e83ffd9560fdcfa26063f267f283.
That does not fully fix the problem, adding a tdb_transaction_start_nonblock to fix it.
|
|
If thousands of smbds try to gencache_stabilize at the same time because the
network died, all of them might be sitting in transaction_start. Don't do the
stabilize transaction if nothing has changed in gencache_notrans.tdb.
Volker
|
|
If the check fails we try to clear the tdb and start
with an empty cache.
metze
|
|
Without this, we panic in wins_srv_is_dead() and fail to start nmbd with
wins support.
Volker, please check.
Guenther
|
|
|
|
This fixes nasty error messages from "net cache flush"
|
|
|
|
This is set to true if the routine returns failure due to an existing but
expired entry.
|
|
|
|
|
|
This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.
|
|
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've
been very lazy calling gencache_shutdown, so this seems not really required.
|
|
|
|
|
|
It's a bit strong to panic here I think.
|
|
|
|
This reverts commit 2954b2be563149380e1fae7fe088b98d6cbd42e7.
(This used to be commit 77ab2fb306a7ad59447a3e1591c2af03447e09c5)
|
|
This reverts commit 7a5a575ffe5196caecedc93970a25abfbe6f8059.
(This used to be commit 62e444dd50ae974c2ab9a553cdf7f188a8f2c538)
|
|
Günther agreed that it might be unnecessary in dsgetdcname_cache_store() :-)
(This used to be commit 7a5a575ffe5196caecedc93970a25abfbe6f8059)
|
|
net cache get was the only one interested in the timeout. That single caller
can take care of the timeout itself then.
With this API change idmap_cache.c can be converted to gencache.
(This used to be commit 2954b2be563149380e1fae7fe088b98d6cbd42e7)
|
|
Guenther
(This used to be commit ec9f8c4cf67c82f4665ed51e4fd0181f5f147ea0)
|
|
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
|
|
tdb won't allow us to write anyway
(This used to be commit 069cd6d63a61065be7926230235e198c456d38ae)
|
|
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
|
|
torturetest).
Mimir, please have a look. DATA_BLOBs will now just show up as "DATA_BLOB"
values with "net cache list".
Guenther
(This used to be commit b8ad546d041a2a8cc85c7db8eba4d2d3b97df1a8)
|
|
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
|
|
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
and fix all compiler warnings in the users
metze
(This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
|
|
to avoid creating the TDB_DATA struct from strings "by hand"
metze
(This used to be commit c22b86595a502eb48c9d0038faee8a9ee41b8438)
|
|
Guenther
(This used to be commit bdd2e0361ce53a4f10fca767f734991797e7f927)
|
|
always exists so that the gencache.tdb can get created there.
Guenther
(This used to be commit e5ed286125d1f4b8b28bf143f987102071fd0de2)
|