| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
might take us out-of-bounds. Only pretend to be length 1 for the malloc.
(This used to be ctdb commit 6de2823f5f7976d4efa20761e518d6b67753f054)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rusty Russell <rusty@rustcorp.com.au> Date: Sat Jul 18 15:28:58 2009 +0930
Make tdb transaction lock recursive (samba version)
This patch replaces 6ed27edbcd3ba1893636a8072c8d7a621437daf7 and
1a416ff13ca7786f2e8d24c66addf00883e9cb12, which fixed the bug where traversals
inside transactions would release the transaction lock early.
This solution is more general, and solves the more minor symptom that nested
traversals would also release the transaction lock early. (It was also suggestd in
Volker's comment in 6ed27ed).
This patch also applies to ctdb, if the traverse.c part is removed (ctdb's tdb
code never received the previous two fixes).
Tested using the testsuite from ccan (adapted to the samba code). Thanks to
Michael Adam for feedback.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
commit 760104188d0d2ed96ec4a70138e6d0bf86d797ed
Author: Rusty Russell <rusty@rustcorp.com.au>
Date: Tue Jul 21 16:23:35 2009 +0930
tdb: fix locking error
54a51839ea65aa788b18fce8de0ae4f9ba63e4e7 "Make tdb transaction lock
recursive (samba version)" was broken: I "cleaned it up" and prevented
it from ever unlocking.
To see the problem:
$ bin/tdbtorture -s 1248142523
tdb_brlock failed (fd=3) at offset 8 rw_type=1 lck_type=14 len=1
tdb_transaction_lock: failed to get transaction lock
tdb_transaction_start failed: Resource deadlock avoided
My testcase relied on the *count* being correct, which it was. Fixing that
now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be ctdb commit ce19658ba13272238058e9b9bc03e62f48b737c0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Andrew Tridgell <tridge@samba.org> Date: Mon Jun 1 13:13:07 2009 +1000
overallocate all records by 25%
This greatly reduces the fragmentation of databases where records
tend to grow slowly by a small amount each time. The case where this
is most seen is the ldb index records. Adding this overallocation
reduced the size of the resulting database by more than 20x when
running a test that adds 10k users.
(This used to be ctdb commit e72974e5cefabc7035399d16633f727f868caa61)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Andrew Tridgell <tridge@samba.org> Date: Mon Jun 1 13:11:39 2009 +1000
auto-repack in transactions that expand the tdb
The idea behind this is to recover from badly fragmented free
lists. Choosing the point where the file expands is fairly arbitrary,
but seems to work well.
(This used to be ctdb commit 233c52bfb087f636ad61e95c12616c02901f4f83)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Author: Andrew Tridgell <tridge@samba.org> Date: Tue Dec 16 14:38:17 2008 +1100
imported the tdb_repack() code from CTDB
The tdb_repack() function repacks a TDB so that it has a single
freelist entry. The file doesn't shrink, but it does remove all
freelist fragmentation. This code originated in the CTDB vacuuming
code, but will now be used in ldb to cope with fragmentation from
re-indexing
(This used to be ctdb commit fe3ceb101a5a9c336973c2c6c31406bd8181c2fe)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Andrew Tridgell <tridge@samba.org> Date: Thu May 28 16:08:28 2009 +1000
make TDB_NOSYNC affect all the fsync/msync calls in transactions
During a transaction commit tdb normally uses fsync/msync calls to
make it crash safe. This can be disabled using the TDB_NOSYNC flag,
but it wasn't disabling all the code paths that caused a fsync/msync.
(This used to be ctdb commit e03980add02a28609a7a0a0c87ebc85419b98144)
|
|
|
|
|
|
|
|
| |
Jim McDonough <jmcd@samba.org> Date: Thu May 21 16:26:26 2009 -0400
Detect tight loop in tdb_find()
(This used to be ctdb commit 5253a0ba3a34fbf5810f363ecc094203d49e835f)
|
|
|
|
|
|
|
|
| |
Tim Prouty <tprouty@samba.org> Date: Tue Mar 31 16:24:07 2009 -0700
tdb: Remove unused variable
(This used to be ctdb commit aa22d1875b1997664af983c0baeabe34e40dd253)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit b90863c0b7b860b006ac49c9396711ff351f777f
Author: Howard Chu <hyc@highlandsun.com>
Date: Tue Mar 31 13:15:54 2009 +1100
Add tdb_transaction_prepare_commit()
Using tdb_transaction_prepare_commit() gives us 2-phase commits. This
allows us to safely commit across multiple tdb databases at once, with
reasonable transaction semantics
Signed-off-by: tridge@samba.org
(This used to be ctdb commit 4c3dac215a088947f645f727343997f5d47e3260)
|
|\
| |
| |
| | |
(This used to be ctdb commit 32a69b0efa078b069802470be6488a4efe32961d)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Something, perhaps root_squash, causing permission denied on the test
file after we copy it over with scp. This sets the initial
permissions to be friendly and adds -p to the scp command to maintain
those friendly permissions.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 52f21f5a92eb14df7540a2ae9e212d936e646c06)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a "stopped" case to log events and stop the event script from
failing with an unknown event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7f67f7395e2233f0bba2e9662404aad49e13f645)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The parsing of "ctdb status -Y" output to determine various node
states was implemented very strictly. Therefore, the parsing broke
due to the addition of the new "stopped" state to the output of "ctdb
status -Y". This relaxes the parsing so that it should work for
versions prior to the introduction of the "stopped" state, as well as
future versions that add new states to the end of the list of bits in
output of "ctdb status -Y".
Similarly the check for cluster unhealthy (in _cluster_is_healthy())
now just checks for a single 1 in any bit in the "ctdb status -Y"
output, rather than checking for a particular number of 0s.
New tests
tests/simple/{41_ctdb_stop.sh,42_ctdb_continue.sh,43_stop_recmaster_yield.sh}
do rudimentary testing of the stop and continue functions.
Remove tests tests/simple/41_ctdb_ban.sh and
tests/simple/42_ctdb_unban.sh. They were both unreliable.
tests/simple/21_ctdb_disablemonitor.sh now schedules a restart, since
one will be required.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 67c5bfb5f02c9d45a32d976021ede4fb2174dfe9)
|
| |\
| | |
| | |
| | | |
(This used to be ctdb commit d7ff60a74595dcb4ae41f5a8193de5b898d61227)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bfc926c866e361ab28330747544b268ba130bf30)
|
| | |
| | |
| | |
| | |
| | |
| | | |
letting it work for 30 second before timing out.
(This used to be ctdb commit 2aa5d18bb42dca4ef9cb049b4fa9d7bc999ce4ad)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>
(This used to be ctdb commit a2768b0732f2ab2e3fafda55587bd2e99eedf0fa)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>
(This used to be ctdb commit dd334caa98882fc59765b7c84eca8e86de785487)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>
(This used to be ctdb commit 78466364f22d6a183710338f138b8c808c6b7753)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>
(This used to be ctdb commit 30cdad97706a9e9bb210120699aa939f6b16e8ca)
|
| | |
| | |
| | |
| | |
| | |
| | | |
create some new fields for ctdb_db and tunables
(This used to be ctdb commit 3a8e7d36cc42aedf4b7665364224140dcbfb3efa)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Update the transaction test tool to the new api for transactions
(This used to be ctdb commit 4d9a53f142deba6ab578af2fc35bfa99c29c3a99)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Only allow stores wrapped in transactions on persistent dbs.
Michael
(This used to be ctdb commit 9dea71cf72ef79a9aadf8ee7cf1a1899527459ff)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Michael
(This used to be ctdb commit c07d6d90f7afd19213ad44624c3e2b9c85f4eea8)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In ctdb_client.c:ctdb_transaction_commit(), after a failed
TRANS2_COMMIT control call (for instance due to the 1-second
being exceeded waiting for a busy node's reply), there is a
1-second gap between the transaction_cancel() and
replay_transaction() calls in which there is no lock on the
persistent db. And due to the lack of global state
indicating that a transaction is in progress in ctdbd, other nodes
may succeed to start transactions on the db in this gap and
even worse work on top of the possibly already pushed changes.
So the data diverges on the several nodes.
This change fixes this by introducing global state for a transaction
commit being active in the ctdb_db_context struct and in a db_id field
in the client so that a client keeps track of _which_ tdb it as
transaction commit running on. These data are set by ctdb upon
entering the trans2_commit control and they are cleared in the
trans2_error or trans2_finished controls. This makes it impossible
to start a nother transaction or migrate a record to a different
node while a transaction is active on a persistent tdb, including
the retry loop.
This approach is dead lock free and still allows recovery process
to be started in the retry-gap between cancel and replay.
Also note, that this solution does not require any change in the
client side.
This was debugged and developed together with
Stefan Metzmacher <metze@samba.org> - thanks!
Michael
(This used to be ctdb commit f88103516e5ad723062fb95fcb07a128f1069d69)
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
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)
|
|
|
|
| |
(This used to be ctdb commit 1d7d7dd515e7ef62cacf2a712a2f4c4d62a38fa5)
|
|
|
|
|
|
| |
these capabilities at runtime
(This used to be ctdb commit 51aaed0e9e42e901451292e8dd545297ab725a62)
|
|
|
|
|
|
| |
getcapabilities"
(This used to be ctdb commit 9b395986962909a5b0548eaea7e45215df72a08e)
|
|
|
|
|
|
|
|
| |
is used
This does not modify any behaviour of the daemon itself other than showing this flag as ON in the ctdeb getcapabilities output
(This used to be ctdb commit fb337c151bd16ad5ad0c99431224451979d8c651)
|
|
|
|
|
|
| |
node is using natgw functionality or not.
(This used to be ctdb commit 89a9bb29a60a6fb1fba55987e6cf0a4baa695e50)
|
|
|
|
|
|
| |
cluster
(This used to be ctdb commit b6c8011024ce4574f945d5a470075c6779b34a43)
|
|
|
|
| |
(This used to be ctdb commit d187eb8507f35a650ff3ffc50fa49110eebca0bd)
|
|\
| |
| |
| | |
(This used to be ctdb commit febf3d6d3f2bdf187c042f560aefc54b8ac72454)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The debug code should run "ctdb status" on a cluster node, not on the
test client.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 34e6f8a04b12f8879eb42d417f9741502ccccf0f)
|
| |
| |
| |
| | |
(This used to be ctdb commit 70603d9a79c80379bf65d9d703c399a65c109c52)
|
| |
| |
| |
| |
| |
| |
| |
| | |
This event is called when a node is stopped and is used by eventscripts that need to do certain cleanup and removal of configuration or ip addresses or routing ...
Note that a STOPPED node is considered "inactive" and as such will not be running the "recovered" event when the rest of the cluster has recovered.
(This used to be ctdb commit 65e9309564611bf937ded3c74a79abff895d7c59)
|
| |
| |
| |
| |
| |
| | |
the node flags from the main daemon to catch when the STOPPED flag is changed.
(This used to be ctdb commit ca4982c40d81db528fe915d5ecc01fcf7df0b522)
|
| |
| |
| |
| |
| |
| |
| |
| | |
master
also verify that we actually do have a natgw master available if this is configured and make the node unhealthy if not.
(This used to be ctdb commit 7f273ee769d671d8c8be87c9187302fb77e814f3)
|
| |
| |
| |
| | |
(This used to be ctdb commit 8bbd96cfbbe98f3fc19e432797cbf4478f753a0b)
|
| |
| |
| |
| | |
(This used to be ctdb commit 4505ea15408ad40dd8deb4041fd75a65a0ad9336)
|
| |
| |
| |
| |
| |
| | |
stopped nodes must yield the recmaster role
(This used to be ctdb commit b75ac1185481060ab71bd743e1e48d333d716eba)
|
| |
| |
| |
| | |
(This used to be ctdb commit 1e007c833098b03dd81797c081da1ae1b10c971c)
|
| |
| |
| |
| |
| |
| | |
ensure that the databases gets frozen and the node enters recovery mode
(This used to be ctdb commit 99f239f8b96c8c0a06ac8ca8b8083be96265865a)
|
| |
| |
| |
| | |
(This used to be ctdb commit d6ddea4167ccdad05e88378ee3f22b6125969562)
|
| |
| |
| |
| |
| |
| | |
pushing out flags changes
(This used to be ctdb commit 501a2747d839ca291b70c761098549cf6d47a158)
|
| |
| |
| |
| |
| |
| | |
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 866aa995dc029db6e510060e9e95a8ca149094ac)
|
| |
| |
| |
| | |
(This used to be ctdb commit 049271c83a09afb8d6c3e5212cf9ca782956b0c6)
|