1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/ctdb/common
Volker Lendecke e7424897a1 ctdb: Make TDB_SEQNUM work synchronously with ctdb
Old war story completely from memory, I could not find the commit that
introduced TDB_SEQNUM so far...:

Back in the days when ctdb was initially developed, TDB_SEQNUM's only
user was the notify.tdb that held one huge record for all notify
records. With that use case in mind it made perfect sense to keep the
SEQNUM stable locally, sacrificing precision. By now notify.tdb is
long gone, an the only user of TDB_SEQNUM right now is brlock.tdb,
which contains special case code for the imprecise ctdb implementation
of TDB_SEQNUM.

With this commit, that special code can go: The TDB_SEQNUM will also
increment when just the DMASTER header field changes, indicating to
smbd that someone else might have changed the record. This will of
course increase the SEQNUM frequency, but it should not increase the
load on ctdb: If you look at the brlock.c workaround, it just does not
do the caching that is possible with precise TDB_SEQNUMs working.

How did I get here? I want to move brl_num_read_oplocks() from
brlock.tdb into locking.tdb, and for that I need precise TDB_SEQNUMs
for locking.tdb.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 24 00:42:17 UTC 2019 on sn-devel-184
2019-05-24 00:42:17 +00:00
..
cmdline.c
cmdline.h
comm.c
comm.h spelling of associated 2019-02-13 04:15:14 +01:00
common.h ctdb: Remove unused ctdb_ltdb_fetch_with_header() 2019-05-23 18:08:36 +00:00
conf_tool.c debug: Use debuglevel_(get|set) function 2018-11-08 11:03:11 +01:00
conf_tool.h
conf.c ctdb-common: Process the whole config file even if an error occurs 2018-09-03 10:52:11 +02:00
conf.h
ctdb_io.c ctdb: buffer write beyond limits 2019-02-22 02:08:07 +01:00
ctdb_ltdb.c ctdb: Make TDB_SEQNUM work synchronously with ctdb 2019-05-24 00:42:17 +00:00
ctdb_util.c
db_hash.c
db_hash.h
event_script.c ctdb-common: Fix memory leak 2019-05-14 07:25:37 +00:00
event_script.h ctdb-common: Factor out basic script abstraction 2018-07-28 17:14:11 +02:00
hash_count.c
hash_count.h
line.c ctdb-common: Add line based I/O 2018-07-28 03:50:11 +02:00
line.h ctdb-common: Add line based I/O 2018-07-28 03:50:11 +02:00
logging_conf.c
logging_conf.h
logging.c ctdb: Fix an out of bound array access 2018-11-14 05:07:15 +01:00
logging.h
path_tool.c debug: Use debuglevel_(get|set) function 2018-11-08 11:03:11 +01:00
path_tool.h
path.c ctdb-common: Allow path_socket() to use $CTDB_SOCKET 2018-11-06 07:16:13 +01:00
path.h
pidfile.c
pidfile.h
pkt_read.c
pkt_read.h
pkt_write.c
pkt_write.h
rb_tree.c
rb_tree.h
reqid.c
reqid.h
run_event.c ctdb-common: Use script abstraction in run_event 2018-07-28 17:14:11 +02:00
run_event.h
run_proc.c ctdb-common: Fix memory leak in run_proc 2019-05-14 08:59:03 +00:00
run_proc.h
sock_client.c
sock_client.h
sock_daemon.c ctdb:common: Do not print NULL if we don't get a sockpath 2019-05-08 16:33:24 +00:00
sock_daemon.h ctdb-common: Set close-on-exec for startup fd 2018-10-22 06:04:20 +02:00
sock_io.c
sock_io.h
srvid.c
srvid.h
system_socket.c ctdb:common: Use C99 initializer for 'struct ifreq' 2019-01-28 10:29:21 +01:00
system_socket.h
system.c ctdb: Use #ifdef instead of #if for config.h definitions 2018-11-28 23:19:21 +01:00
system.h ctdb-common: Drop unused function mkdir_p_or_die() 2018-07-27 08:42:20 +02:00
tunable.c ctdb: Use C99 initializer for last element of tunables 2019-01-28 10:29:21 +01:00
tunable.h