| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
metze
(This used to be ctdb commit 4efab41dfa61d5c7951c583d584df3455ee9c704)
|
|
|
|
|
|
| |
metze
(This used to be ctdb commit a2c9e4578e149eccb2c6183f64a6b657eb95c5e1)
|
|
|
|
|
|
| |
metze
(This used to be ctdb commit 6bd780510058e5589f2f7c3722d37acbba4935ab)
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge commit 'rusty/ctdb-no-setsched'
Conflicts:
server/ctdb_vacuum.c
(This used to be ctdb commit b4365045797f520a7914afdb69ebd1a8dacfa0d9)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1) It's buggy. Code needs to be carefully written (ie. no busy
loops) to handle running with it, and we fork and run scripts.[1]
2) It makes debugging harder. If ctdbd loops (as has happened recently)
it can be extremely hard to get in and see what's happening. We've already
seen the valgrind hacks.
3) We have seen recent scheduler problems. Perhaps they are unrelated,
but removing this very unusual setup is unlikely to hurt.
4) It doesn't make anything faster. Under all but the most perverse of
circumstances, 99% of the cpu gives the same performance as 100%, and
we will always preempt normal processes anyway.
[1] I made this worse in 0fafdcb8d353 "eventscript: fork() a child for
each script" by removing the switch_from_server_to_client() which
restored it, but even that was only for monitor scripts. Others were
run with RT priority.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 482c302d46e2162d0cf552f8456bc49573ae729d)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The do_setsched was being tested for whether to mmap tdbs: let's make it
explicit. We can also happily move the kill-child eventscript hack under
this flag.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469)
|
| |
| |
| |
| |
| |
| | |
metze
(This used to be ctdb commit 1cdc8dbb9cb971cf6dd6cd22b1adaf70ddc77e65)
|
| |
| |
| |
| |
| |
| | |
metze
(This used to be ctdb commit 5abe44d0113839d3a45c9a31d30856aa70c2ea1f)
|
|/
|
|
|
|
|
|
| |
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 1635e931b909c66eb3b1f5357e3a549b1a0da70d)
|
|
|
|
|
|
|
|
| |
This can happen frequently when recoveries intercept transactions.
Michael
(This used to be ctdb commit c46adb210e47530488503e20d682d4d182c0fb79)
|
|
|
|
|
|
|
|
| |
This reduces some noise.
Michael
(This used to be ctdb commit 54d227811753f4a87f1a2c9dc0b1389f5ca2a12f)
|
|
|
|
|
|
|
|
|
|
|
|
| |
We also no longer return an error before scripts have been run; a special
zero-length data means we have never run the scripts.
"ctdb scriptstatus all" returns all event script results.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 9b90d671581e390e2892d3a68f3ca98d58bef4df)
|
|
|
|
|
|
|
|
|
|
| |
We're going to allow fetching status of all script runs, so this
name is no longer appropriate.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit f5cb41ecf3fa986b8af243e8546eb3b985cd902a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The child no longer uses ctdb_ctrl_event_script_init or
ctdb_ctrl_event_script_finished, and the others are redundant: it
doesn't need to tell us it's starting a script when it only runs one.
We move start and stop calls to the parent, and eliminate the RPC
infrastructure altogether.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit 391926a87a7af73840f10bb314c0a2f951a0854c)
|
|
|
|
|
|
|
|
|
|
| |
This unifies code paths and simplifies things: we just hand -ENOEXEC to
ctdb_ctrl_event_script_stop().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(This used to be ctdb commit eadf5e44ef97d7703a7d3bce0e7ea0f21cb11f14)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit d971b2ca84c0451dc7e5acbf4a5ade06270a2044)
|
|
|
|
|
|
|
|
|
| |
To cope with timeouts when recoveries and transactions collide.
Maybe 100 is too high.
Michael
(This used to be ctdb commit c23d804165e84bdf95ba960c953c736d361011d7)
|
|
|
|
|
|
|
|
| |
in ctdb_transaction_fetch_start
Michael
(This used to be ctdb commit 428914377851a98b3fc893798783fbfebffc1c0d)
|
|
|
|
|
|
|
|
|
| |
So that it is correctly handled by recoveries.
Also explicitly set the dmaster field to the current node's pnn.
Michael
(This used to be ctdb commit 03a5bb727b9db1ba952632f08ceb5355f0df842d)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit e5496a83ef4a01604195b27c4b97f50d4979510e)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit b9882710e12f28c96a0af298e419160f00578241)
|
|
|
|
|
|
|
|
| |
instead of sleeping 1 second, sleep between 1 and 100 milliseconds
Michael
(This used to be ctdb commit a5d90d8ed8b44355c4ffb9c32ded772025fcc174)
|
|
|
|
|
|
|
|
|
|
|
| |
The gap that remained is between checking whether a transaction commit
is in progress and taking the lock. Now we first take the lock and then
check whether a transaction commit is in progress. If so, we release the
lock, wait for one second and retry.
Michael
(This used to be ctdb commit b95524c08bf12914120cb6c818ecc1c99738fe37)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit 9e4902c7d3ad1329c296f4196fcb1396f2a7a6a0)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit d7b9babda2f7c7f7b95ee19ec75c37200816c6ef)
|
|
|
|
|
|
|
|
|
|
| |
* add __location__
* wrap overly long line
* print unsigned ints as unsigned (reqid, opcode, destnode)
Michael
(This used to be ctdb commit 6b47ea111867c845974aa2687a658ebca2854816)
|
|
|
|
|
|
|
|
| |
time since the last recovery OR failover."
This reverts commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36.
(This used to be ctdb commit cb36bbb5418290e8e5b770d2d836285b15da2a6f)
|
|
|
|
|
|
| |
since the last recovery OR failover.
(This used to be ctdb commit 3b0d44497800a16400d05a30bdaf6e6c285d4b36)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit 9560f8b7fe0f7ee0386a87c2653333071050fe4b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ctdb_transaction_commit(), when the trans2_commit control fails, there
is a race condition in the 1 second sleep between the local transaction_cancel
and the call to ctdb_replay_transaction(): The database is not locked, and
neither is the transaction_lock record. So another client can start and possibly
complete a new transaction in this gap, but only on the same node: The locking
of the transaction_lock record on a different node which involves migration of
the record to the other node has been disabled by introduction of the
transaction_active flag on the db which closes precisely this gap from the start
of the commit until the call to TRANS2_FINISH or TRANS2_ERROR.
But this mechanism does not cover the case where a process on the same node
tries to start a transaction: There is no obstacle to locking the transaction_lock
record because the record does not need to be migrated.
This commit closes this race condition in ctdb_transaction_fetch_start()
by using the new ctdb_ctrl_transaction_active() call to ask the local
ctdb daemon whether it has a transaction running on the database.
If so, the check is repeated until the running transaction is done.
This does introduce an additional call to the local ctdbd when starting
transactions, but it does close the (hopefully) last race condition.
Michael
(This used to be ctdb commit 02ee9dfd3c6b09f5c5172a7e38738c20b7f0aecd)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit 813cfd7c625ac8af4ef169cc92fb6d69f66004c9)
|
|
|
|
|
|
|
| |
add a global variable holding the pid of the main daemon.
change the tracking of time() in the event loop to only check/warn when called from the main daemon
(This used to be ctdb commit a10fc51f4c30e85ada6d4b7347b0f9a8ebc76637)
|
|
|
|
|
|
| |
metze
(This used to be ctdb commit a244b75ee49556b0ff51e254cc812594ee3b23a7)
|
|
|
|
| |
(This used to be ctdb commit e8d692590da1070c87a4144031e3306d190ebed2)
|
|
|
|
|
|
|
|
| |
priority to freeze/thaw to the daemon.
this is encoded in the srvid field of the request header
(This used to be ctdb commit 0cb3d33caa42ed783e03bc825b181dde4cf63616)
|
|
|
|
| |
(This used to be ctdb commit ca6d045e419f308f57e74d4c978907afb05ddb85)
|
|
|
|
|
|
|
|
| |
default to priority 1.
database priorities will be used to control in which order databases are locked during recovery in.
(This used to be ctdb commit 67741c0ee01916d94cace8e9462ef02507e06078)
|
|
|
|
| |
(This used to be ctdb commit be52954d921e7d443304cf49fbd488c619a9c4ec)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two races in concurrent transactions on a single node.
One in starting a transaction, and one with committing (replaying).
This commit closes the first race by storing the pid in the
transaction-lock record and comparing the own pid against it
as a measure to prevent starting a second transaction when
a second node has come inbetween and changed the pid in the lock
record.
Michael
(This used to be ctdb commit 84e5a55a900b01903b80e23045edfc726d8d77a1)
|
|
|
|
| |
(This used to be ctdb commit 0c4c2240267af183d54ffd4c0aacda208f6eff6a)
|
|
|
|
|
|
| |
update scriptstatus output so it lists disabled scripts
(This used to be ctdb commit 7e799b7523c9699bd65a8a8207f7e03d668b0b81)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit c513a31d755003d7af91529790b06ce0d226c90f)
|
|
|
|
|
|
| |
Michael
(This used to be ctdb commit 875778fbbfd6b0f09fd2db76f7348ad6271350a3)
|
|
|
|
|
|
|
|
| |
Only allow stores wrapped in transactions on persistent dbs.
Michael
(This used to be ctdb commit 9dea71cf72ef79a9aadf8ee7cf1a1899527459ff)
|
|
|
|
|
|
|
|
| |
existing record
Michael
(This used to be ctdb commit e9194a130327d6b05a8ab90bd976475b0e93b06d)
|
|
|
|
|
|
|
|
|
|
| |
also check the returned status code in case the _stop() command failed
due to the eventscripts failing.
If this happens, make "ctdb stop" log an error to the console and try
the operation again.
(This used to be ctdb commit 20e82e0c48e07d1012549f5277f1f5a3f4bd10d1)
|
|
|
|
|
|
| |
these capabilities at runtime
(This used to be ctdb commit 51aaed0e9e42e901451292e8dd545297ab725a62)
|
|
|
|
|
|
| |
node is using natgw functionality or not.
(This used to be ctdb commit 89a9bb29a60a6fb1fba55987e6cf0a4baa695e50)
|
|
|
|
|
|
| |
that are used to stop/continue a node instead of using modflags messages
(This used to be ctdb commit 54b4a02053a0f98f8c424e7f658890254023d39a)
|
|
|
|
| |
(This used to be ctdb commit 36cc2e586f03fa497ee9b06f3e6afc80219c4aaa)
|