From dbf03959244c392073281c10badd2095397ad2f2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 29 Oct 2004 07:29:26 +0000 Subject: r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4. We found a few months ago that TDB_CLEAR_IF_FIRST is extremely inefficient for large numbers of connections, due to a fundamental limitation in the way posix byte range locking is implemented. Rather than the nasty workaround we had for Samba3, we now have a single "cleanup tmp files" function that runs when smbd starts. That deletes the tmp tdbs, so TDB_CLEAR_IF_FIRST is not needed at all. (This used to be commit ffa285bc783c775a2d53a58fb691ca339e6c76ae) --- source4/libcli/unexpected.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli') diff --git a/source4/libcli/unexpected.c b/source4/libcli/unexpected.c index e109c9d5bf..19a02bdeb8 100644 --- a/source4/libcli/unexpected.c +++ b/source4/libcli/unexpected.c @@ -50,7 +50,7 @@ void unexpected_packet(struct packet_struct *p) mem_ctx = talloc_init("receive_unexpected"); if (!mem_ctx) return; tdbd = tdb_wrap_open(NULL, lock_path(mem_ctx, "unexpected.tdb"), 0, - TDB_CLEAR_IF_FIRST|TDB_DEFAULT, + TDB_DEFAULT, O_RDWR | O_CREAT, 0644); talloc_destroy(mem_ctx); if (!tdbd) { -- cgit