IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
(cherry picked from commit 4334092cba)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 093f57a2c00f2d629a3b58e58202f1a7e1bbd406)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from samba commit 9776cb0345)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit d1873bd81bfc9f486b88f3a38c65c7de8f5a0909)
metze
(cherry picked from samba commit 5ca0a4bfd6)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 04aeac728f56c65b973762f09977de1b1b99099e)
We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.
However we may change the default together with a major version
number change in future.
metze
(cherry picked from samba commit 3b9f19ed91)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit c1c0ede32dc00ed619d1cf5fda40a9de43995f3a)
metze
(cherry picked from samba commit 85449b7bcc)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 855391c1e37012b0d6c673a304bb8da8a1efcd72)
While studying tdb, I've noticed a couple of mismatches between readme
and actual code:
- tdb_open_ex changed it's log_fn argument to log_ctx
- there is now no tdb_update(), which it seems was transformed into
non-exported tdb_update_hash()
There were other mismatches, but I don't remember them now, sorry.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 83de5c8263)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 7a88f1df9190674deaf5dcbedad02ae4120a5263)
The reason I do it is that when using older python-tdb as shipped in
Debian Lenny, python interpreter crashes on this test:
(gdb) bt
#0 0xb7f8c424 in __kernel_vsyscall ()
#1 0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6
#4 0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6
#5 0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6
#6 0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1
#7 0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so
#8 0x0a038d08 in ?? ()
#9 0x00000000 in ?? ()
master's pytdb does not (we have a check for self->closed in obj_close()),
but still...
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 71a21393dd)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 03372b4ea8ba2938468a5c0fc234d604966ce070)
So that erroneous double tdb_close() calls do not try to close() same
fd again. This is like SAFE_FREE() but for fd.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit b4424f8234)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit f5c992bdaeb73ef726ff4728a9922721474cd6f5)
It's Tdb.get(), not Tdb.fetch().
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit cfed5f946d)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 76aacdd8e1106f26565e25903091a757b59cd7e2)
This can help with ldb where we rewrite the index records
(cherry picked from samba commit d4c0e8fdf0)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 470750fa2e3cf987f10de48451b1ee13aab03907)
metze
(cherry picked from samba commit 3b62e250c0)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 03b3682e3fa53c9f5fdf2c4beac8b5d030fd2630)
Also, set logging function so we get more informative messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 0944931159)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 6ac7ef8bf4d384f880c7f483ace70f8e08c15a8b)
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains. tdb_check() provides this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 022b4d4aa6)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit df1a3ce0380fa9d8722b2f9b16f65557095e4c83)
We no longer use swig for pytdb, so there is no need for swig make
rules. Also pytdb.c header should be updated.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit ecbe5ebd8d)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 27611d6a0c313732e438cb24c82b9de126e50156)
This fixes the build on Tru64.
metze
(cherry picked from samba commit 3718cf294a)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 5652e403be099f35cdd29fda8ba4fe2c35de8035)
With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for
write-enabled transaction. Sadly, this also removed the possibility to ever
remove dead records left over from tdb_delete calls within a transaction.
Tridge, please check this! Did dde9f3f006 have any reason beyond performance
optimizations?
Thanks,
Volker
(cherry picked from samba commit 3f884c4ae3)
(This used to be commit 1d85e0647e)
(cherry picked from samba commit 8c88209c6f)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit b02bf7659f04f1fa203834bd75a2392b48e56c16)
Found by cppcheck:
[lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
(cherry picked from samba commit 497b9e460b)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 5d4cc4b018a538dc3f1d79fe091f3e6e67003daf)
tdbbackup was originally written before we had transactions, and it
attempted to use its own fsync() calls to make it safe. Now that we
have transactions we can do it in a much safer (and faster!) fashion
(cherry picked from samba commit 2e4247782b)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit cd23d36ada9631095ca68663516de0c8d8c3bbed)
This means you can kill it at any time and expect no corruption.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 0fc6800005)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit f7278a277ed91587cae5b5e3660dad7124bdb73f)
It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
Also, we should never set errno, as io.c was doing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit b77f41d58b)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit a6620f6e74aadc708395b21b42303d1082192fcc)
When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled.
This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb.
The majority of this patch comes from moving internal functions to _<funcname> to
avoid double-tracing. There should be no additional overhead for the normal (!TDB_TRACE)
case.
Note that the verbose traces compress really well with rzip.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from samba commit 703004340c)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit b01b756cb577f32a1ec4597efb00017241e01685)
There was a race condition that caused the torture.tdb to be left in a
state that needed recovery. The torture code thought that any message
from the tdb code was an error, so the "recovered" message, which is a
TDB_DEBUG_TRACE message, marked the run as being an error when it
isn't.
(cherry picked from samba commit 5dcf0069b6)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 43c97b259b19c42b4edc7f83dbfc5e486568b4e3)
Michael
(cherry picked from samba commit e440a2e11e)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit c1b8d32b4ef87b9d8f37b451f47fcee2ea753d21)
This adds 3 simple speed tests to tdbtool, for transaction store,
store and fetch.
On my laptop this shows transactions costing about 10ms
(cherry picked from samba commit e15027155d)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 463279c972fa4538919bdd1dff48ca6b2fb8d49c)
So one can perform tdbtool operations protected by transactions.
Michael
(cherry picked from samba commit 91e1bab2e9)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 35a5b874b925380f7c227e47aebb590c9db4739e)
Michael
(cherry picked from samba commit 817383d88d)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit dc287a7d7420cca0b104049e689a73202bc535f8)
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.
(cherry picked from samba commit 46c99ec2a3)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 5ef5ddb8369e5e76173285fe9a08498dc8dc73ab)
Michael
(cherry picked from samba commit 55dcf928eb)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit ef1dc585d869a9e48164cd65bafc92c1da245007)
Michael
(cherry picked from samba commit cfa4e7ec75)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 0ae735b7a2096a40e5e47086ec41d9d45ef6d36b)
Michael
(cherry picked from samba commit 25939a627f)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 2e69647404c87c438ae7c180277ac3b532941efd)
by first concatenating multilint parentheses and removing typefes afterwards.
Michael
(cherry picked from samba commit 13bfcd5a93)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 37225f1ed3f70d7259c2af2c51c671105c34476a)
Michael
(cherry picked from samba commit ecd12bfb38)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 66fffa577e051212ac7541be906b6c80f4a7c0c9)