1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

335 Commits

Author SHA1 Message Date
Ronnie Sahlberg
dabf61075f add pdu's that the client can use to query the ctdb daemon of the path
to the database it created (so the client can open and access the same 
file)

(This used to be ctdb commit c2eda19499b3263b2248c41bd531fb73c7b42212)
2007-04-24 00:06:48 +10:00
Ronnie Sahlberg
bd62c78154 split the 32bit idr field into two.
store the idr as the high 16 bits and use a rotating counter for the low 
16 bits.

(This used to be ctdb commit 7c763b7b5e6ca54a6df4586893ddaf1b508b4c22)
2007-04-23 18:19:50 +10:00
Ronnie Sahlberg
42971d6565 add a comment that sometimes sending remote calls straight to the
lmaster instead of what the nodes think is the dmaster (which might be 
stale) improve performance.

(This used to be ctdb commit f535f79e6a2a6c6d07141b96e0b957fa93c684f4)
2007-04-23 17:05:09 +10:00
Ronnie Sahlberg
1bb55c1f77 merge from tridge
(This used to be ctdb commit 3457af559a5d54fd9eb787f18ff15d7c19271f60)
2007-04-23 02:35:05 +10:00
Andrew Tridgell
9e8002dd67 fixed the reverse of the last bug - handle the case when the new dmaster is the lmaster
(This used to be ctdb commit b2599834d2ace7369a1b36f85fdf6eb62f047e30)
2007-04-22 18:19:49 +02:00
Andrew Tridgell
1349f0bd49 mark authoritative records
(This used to be ctdb commit f2076338221c5cb28f9045ce5345cc6a9b429f1a)
2007-04-22 16:53:09 +02:00
Andrew Tridgell
f9bfd8a081 debug changes
(This used to be ctdb commit 3ddc1e4f1d3660d33cc2a07e53b66772116e9640)
2007-04-22 16:39:55 +02:00
Ronnie Sahlberg
c7c5f2e9bc merge from tridge
(This used to be ctdb commit 1c33c9856c05068a5681f3e37c9b94f429038a69)
2007-04-22 22:31:11 +10:00
Andrew Tridgell
107d91e391 - when handling a record migration in the lmaster, bypass the usual
dmaster request stage, and instead directly send a dmaster
  reply. This avoids a race condition where a new call comes in for
  the same record while processing the dmaster request

- don't keep any redirect records during a ctdb call.  This prevents a
  memory leak in case of a redirect storm

(This used to be ctdb commit 59889ca0fd606c7d2156839383a09dfc5a2e4853)
2007-04-22 14:26:45 +02:00
Ronnie Sahlberg
f70c7df1f0 merge from tridge
(This used to be ctdb commit 2644ee0e81e4f78d35528999b0a18f4253f99794)
2007-04-22 20:55:49 +10:00
Andrew Tridgell
2a08818e24 added a useful tool for dumping a ctdb
(This used to be ctdb commit 671ed94011e21396571a3f4a5191b9a83911c952)
2007-04-22 09:24:27 +02:00
Ronnie Sahlberg
348e953f4b merge from tridge
(This used to be ctdb commit 831847ba999e504b9c75f4e7c9c09c26bbeffcba)
2007-04-22 17:03:36 +10:00
Andrew Tridgell
9398d48c54 update the vnn as well when getting the connection information
(This used to be ctdb commit 25f36f7edaa56a16692949d6750b65d74bf4218f)
2007-04-21 23:24:39 +02:00
Andrew Tridgell
531f8237eb merge from samba4
(This used to be ctdb commit a64c6ace26559b2793f2a804430fb0fc53f03a34)
2007-04-21 10:09:37 +02:00
Ronnie Sahlberg
540e862afc merge from tridges tree
(This used to be ctdb commit d3fdb22eec5fd21132e2a9ab19ebbb21217ccec9)
2007-04-21 17:57:50 +10:00
Andrew Tridgell
520f7971cd - prevent sending dmaster requests to ourselves
- add some debug code

(This used to be ctdb commit 26ad1ec3a3b872520a735e4fe4f224f716643731)
2007-04-21 09:22:46 +02:00
Andrew Tridgell
3fb0fa97b3 merge fixes from samba4
(This used to be ctdb commit 23d892c2696c5c1dd9f12f1ccd1acfa264be4fb6)
2007-04-21 13:08:22 +10:00
Andrew Tridgell
5afe9b709c merge tdb updates from samba4
(This used to be ctdb commit c9959e5741a17fd52070b744714eb00bf92a93eb)
2007-04-21 13:07:49 +10:00
Andrew Tridgell
e9d43f5e43 - expanded status to include count of each call type
- added lockwait latency

(This used to be ctdb commit 0b5d196147e644cf8b172cb4b593fd46b1caa386)
2007-04-20 21:02:53 +10:00
Andrew Tridgell
2e5aae04de added ctdb_status tool
(This used to be ctdb commit 908d6c6a936e21f70f05827ce302e966cca0132a)
2007-04-20 20:07:47 +10:00
Andrew Tridgell
00c706c2b8 - fixed a problem with packets to ourselves. The packets were being
processed immediately, but the input routines indirectly assumed
  they were being called as a new event (for example, a calling
  routine might queue the packet, then afterwards modify the ltdb
  record). The solution was to make self packets queue via a zero
  timeout.

- fixed unlinking of the socket in a exit in the lockwait code. Needed
  an _exit instead of exit so atexit() doesn't trigger

- print latency of lockwait delays

(This used to be ctdb commit 1b0684b4f6a976f4c5fe54394ac54d121810b298)
2007-04-20 17:58:37 +10:00
Andrew Tridgell
bba02ce182 merged fix from volker (thanks!)
(This used to be ctdb commit 5f51864f837de5fd262d6a41722605789494cb66)
2007-04-20 07:50:34 +10:00
Andrew Tridgell
01b7eac536 minor debug changes
(This used to be ctdb commit 1950d96458238782c3bfd8e41a053c4be8330ef9)
2007-04-20 07:47:37 +10:00
Ronnie Sahlberg
4ffc63aa2b merge from tridge
(This used to be ctdb commit 819cdf314900388fe36368a21e2c4895b78b9203)
2007-04-20 07:19:07 +10:00
Volker Lendecke
5edb0a8011 The remote node needs to get the IMMEDIATE_MIGRATION flag to actually send the
record


(This used to be ctdb commit 9159434b1eef39b7de58b30626039f1e45a97306)
2007-04-19 17:44:45 +02:00
Andrew Tridgell
eabe0bd7d4 fixed a bug found by volker - initialse the record on disk when initialised in memory
(This used to be ctdb commit f7903b00cdc91ae7d7e38b1a38d2b7b663e3a728)
2007-04-19 18:31:49 +10:00
Andrew Tridgell
e5c5a91a7b - split out ctdb_ltdb_lock_fetch_requeue() into a simpler
ctdb_ltdb_lock_requeue() and a small wrapper

- use ctdb_ltdb_lock_requeue() to fix a possible hang in
  ctdb_reply_dmaster(), where the ctdb_ltdb_store() could hang waiting
  for a client. We now requeue the reply_dmaster packet until we have
  the lock

(This used to be ctdb commit 97cd7aa09ce3abbb5e3e965c5c81668e0c0133a5)
2007-04-19 17:43:27 +10:00
Andrew Tridgell
273a3944a8 - added a --torture option to all ctdb tools. This sets
CTDB_FLAG_TORTURE, which forces some race conditions to be much more
  likely. For example a 20% chance of not getting the lock on the
  first try in the daemon

- abstraced the ctdb_ltdb_lock_fetch_requeue() code to allow it to
  work with both inter-node packets and client->daemon packets

- fixed a bug left over in ctdb_call from when the client updated the
  header on a call reply

- removed CTDB_FLAG_CONNECT_WAIT flag (not needed any more)

(This used to be ctdb commit 7559dcd184666c3853127e3c8f5baef4fea327c4)
2007-04-19 16:27:56 +10:00
Andrew Tridgell
49458c5946 merge from ronnie
(This used to be ctdb commit 257af5c31a311217315e07d6a194c3f96c8dfa80)
2007-04-19 12:54:51 +10:00
Ronnie sahlberg
db12f3359b the checks for srcnode and destnode from the client are redundant since the daemon will sort these out itself before it sends the call of to either the local handler or a remote daemon
(This used to be ctdb commit 9175d49ba1ce2af99907fa227b50d281f85c98ae)
2007-04-19 12:48:19 +10:00
Andrew Tridgell
eeb3f01e02 merge from ronnie
remove unused bench_incr function in ctdb_bench.c

(This used to be ctdb commit 39424cb13070c9964121b533a9f9ba448ce49d16)
2007-04-19 12:43:19 +10:00
Ronnie sahlberg
5a6b800fe6 remove a comment that is no longer valid
(This used to be ctdb commit e834cf18cfc18c9462f0dfff0315b5b6798771f8)
2007-04-19 12:34:39 +10:00
Andrew Tridgell
634aa50d90 don't need these structures any more
(This used to be ctdb commit 506117dc24ec647c629c92a3996455cd8d9c8ec6)
2007-04-19 12:34:24 +10:00
Ronnie sahlberg
63e513aeeb add some tests in the daemon that a REQ_CALL that a client sent us has valid srcnode and destnode
update ctdbd_test.c to show how to force a migration onto the local node

(This used to be ctdb commit fe313cee4927075be311e28ea106bd5cc035f217)
2007-04-19 12:33:13 +10:00
Ronnie sahlberg
9f0c8b566c merge from tridge
(This used to be ctdb commit 45081eadb89fdaf8c831e161ae7df816beda934b)
2007-04-19 12:00:29 +10:00
Ronnie sahlberg
2013ae16ba merge from tridge
(This used to be ctdb commit e9561cfe190af8c0594de7531fbf087730aae60c)
2007-04-19 11:58:34 +10:00
Andrew Tridgell
e830dfd18d much simpler fetch code!
fetch is now confined to the client code, no spcial code at
all in the daemon. 

(This used to be ctdb commit 3ec801c9717e250b902760862df188e03c9bdbf4)
2007-04-19 11:56:37 +10:00
Andrew Tridgell
d0af75d1fa - fully separate the client version of ctdb_call from the daemon
version. The client version is different enough that this is
  worthwhile

- enable local shortcut for client version of ctdb_call

- add idr_find_type(), with better error reporting in case of type
  mismatch

(This used to be ctdb commit 2388094c5f7b6ce003e86b05620c06217d63b49c)
2007-04-19 11:28:01 +10:00
Andrew Tridgell
b79e29c779 - make he packet allocation routines take a mem_ctx, which allows
us to put memory directly in the right context, avoiding quite a few
  talloc_steal calls, and simplifying the code

- make the fetch lock code in the daemon fully async

(This used to be ctdb commit d98b4b4fcadad614861c0d44a3854d97b01d0f74)
2007-04-19 10:37:44 +10:00
Ronnie sahlberg
697126e61f ctdbd does no longer take a --daemon parameter since we no longer do non-daemon mode
remove the parameter from the ctdbd script

remove the store_unlock from ctdbd_test since there is no and will be no pdu for this
CTDB_REPLY_FETCH_LOCK no longer return the data for the record since the client is assumed to read this itself from the local tdb. remove some variables that no longer exists.

(This used to be ctdb commit 77c43479e1932b27387fc2f85a3cb6538633b481)
2007-04-19 10:24:11 +10:00
Ronnie sahlberg
1812d787ac merge from tridge
(This used to be ctdb commit 414952b2dd48de4a9edb532ba9c2cb6e22bb6d7f)
2007-04-19 10:07:07 +10:00
Andrew Tridgell
fde5a66531 avoid a deadlock the fetch_lock code. The deadlock could happen when
a client held the chainlock, and the daemon received a dmaster reply
at the same time. The daemon would not be able to process the dmaster
reply, due to the lock, but the fetch lock cannot make progres until
the dmaster reply is processed.

The solution is to not hold the lock in the client while talking to
the daemon. The client has to retry the lock after the record has
migrated. This means that forward progress is not guaranteed. We'll
have to see if that matters in practice.

(This used to be ctdb commit 737e5a1253cb048222c595a474aff71c99fc554f)
2007-04-19 10:03:20 +10:00
Andrew Tridgell
a3ab61b384 - use separate directories for the tdb files by default
- use TDB_CLEAR_IF_FIRST to ensure we don't use an old tdb
(This used to be ctdb commit ac47d7b4eb79597da1358da21f10e634cdc9dd2e)
2007-04-19 09:58:23 +10:00
Andrew Tridgell
36816ee12a merged the db_dir changes from volker. Changed them slightly,
to make the --dbdir option available to all ctdb tools, not just
the daemon

(This used to be ctdb commit add63b0ae11d8727163bb6f0c94a617d9b88ef28)
2007-04-19 09:14:25 +10:00
Ronnie sahlberg
450ab4a170 merge from tridge
(This used to be ctdb commit a8d7f1af3751276599086735660fec0659d57b1c)
2007-04-19 08:18:38 +10:00
Volker Lendecke
9135024fc7 Add --dbdir to ctdbd. Necessary for shared operation between ctdbd and smbd.
(This used to be ctdb commit bce40105e2ccbca5e364793bbf1a6357e6dd69b2)
2007-04-18 16:36:22 +02:00
Andrew Tridgell
31e2331608 this fixes a timeout error spotted by volker
It ensures that when the client context goes away (such as when the client exits) 
that any timed events and partially completed requests from that client also go away
(This used to be ctdb commit 45a45a0a44d4da9b45719aac72b0ae4bd4c74462)
2007-04-18 19:12:29 +10:00
Andrew Tridgell
ef505399e6 merged cleanup from ronnie
(This used to be ctdb commit 26037a7b3557faa1c10944f654b1465877c6b840)
2007-04-18 18:43:34 +10:00
Andrew Tridgell
908f5085b0 validate dmaster on a client fetch request
(This used to be ctdb commit b49069aac0c14e5a02be843247930c197d620a81)
2007-04-18 18:39:02 +10:00
Ronnie sahlberg
8dc428d63d we dont need the structure ctdb_reply_shutdown since we dont implement that pdu any more
(This used to be ctdb commit 5bac32b3daf3c61214269cd09cfc1b6c3f8c3d6e)
2007-04-18 17:04:26 +10:00