1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

200 Commits

Author SHA1 Message Date
Ronnie Sahlberg
6f83805183 READONLY: skip vacuuming or deleting records with readonly delegations.
they are hot. wait until they have been revoked before we recall them.

(This used to be ctdb commit 7417d994c2a159f71d27d4bcd2f53684862eece3)
2012-02-29 16:09:24 +11:00
Ronnie Sahlberg
42e477b14e READONLY: only send a control to schedule fast-vacuuming from child context iff we have a connection open to the main daemon
there are some child processes where we do not create a connection to the main daemon (switch_from_server_to_client()) because it is expensive to set up and we normally might not need to talk to the daemon at all via a domainsocket.
but we might want to still call to ctdb_ltdb_store() from such chil processes.

(This used to be ctdb commit 9e372a08c40087e6b5335aa298e94d88273566a5)
2012-02-21 07:03:44 +11:00
Michael Adam
bf99bb65e0 vacuum: improve logging in remove_record_from_delete_queue()
(This used to be ctdb commit 809d1f3b8a9232fce0376cb47e4f633b49237529)
2011-12-23 17:39:13 +01:00
Michael Adam
ca7d2bf63a vacuum: improve logging in delete_record_traverse()
(This used to be ctdb commit 40ca781b3305d9f0bfee5b109d4eefde461a3f13)
2011-12-23 17:39:13 +01:00
Michael Adam
8348c431f2 vacuum: improve logging in insert_record_into_delete_queue()
(This used to be ctdb commit db59ac2ee6a9f5f7f088ebbc5e2800d9e57aae17)
2011-12-23 17:39:13 +01:00
Michael Adam
0a6805eed0 vacuum: improve debugging in delete_queue_traverse()
(This used to be ctdb commit 2c44c6dc583872c603a399afb01936abcbb05158)
2011-12-23 17:39:13 +01:00
Michael Adam
26cac0627e vacuum: add debug message to insert_record_into_delete_queue() for failed insert
(This used to be ctdb commit ae78e8d991636a3a79dd9fbcefc15032afb08f55)
2011-12-23 17:39:12 +01:00
Michael Adam
190b1b240c vacuum: improve debugging in insert_record_into_delete_queue()
(This used to be ctdb commit 6e6aaba28ac560d51d7450ebcf99babf868d0aea)
2011-12-23 17:39:12 +01:00
Michael Adam
cb259e6bd1 vacuum: initialize (to zero) the vacuum fetch list in ctdb_vacuum_init_vacuum_data()
(This used to be ctdb commit 772e08c29ef70a4cc73f7887939e5071a90a98cb)
2011-12-23 17:39:12 +01:00
Michael Adam
d29b2bd8bd vacuum: add statistics output for processing of the delete list
(This used to be ctdb commit bec2ff46402b6d90521c75e8d46b9f6f2f47239a)
2011-12-23 17:39:11 +01:00
Michael Adam
bdf395c2e2 vacuum: add a comment explaining a race in the vacuum code.
(This used to be ctdb commit 07f1ba54b1617fadd6fe83826dd8e76f37cea071)
2011-12-23 17:39:09 +01:00
Michael Adam
c10fc30a38 vacuum: factor out initialization of the vacuum data from ctdb_vacuum_db()
for readability

(This used to be ctdb commit 1963e33859e9dc51e9e88664c6d95e62c7c8b8be)
2011-12-23 17:39:09 +01:00
Michael Adam
4b565b1577 vacuum: streamline ctdb_process_delete_list()
Reducing indentiation and improving use of talloc.

(This used to be ctdb commit 11f52ba18370f1dda983f2263f9af82045b4fdea)
2011-12-23 17:39:08 +01:00
Michael Adam
50a9444626 vacuum: factor processing of the delete list out of ctdb_vacuum_db()
(This used to be ctdb commit cf68b762432a18e4a3cda137591b3f005c196906)
2011-12-23 17:39:08 +01:00
Michael Adam
4e5bdd45a0 vacuum: factor processing of vacuum fetch lists out of ctdb_vacuum_db()
(This used to be ctdb commit 905fc9cd7126ab84c23d4a803c59e32b9c54e6f0)
2011-12-23 17:39:08 +01:00
Michael Adam
1a462df86c vacuum: factor out full vacuum run out of ctdb_vacuum_db() as ctdb_vacuum_db_full()
(This used to be ctdb commit e31594e0c13899e88013ce7eb7e3dc434c2f0723)
2011-12-23 17:39:07 +01:00
Michael Adam
dbede3de7e vacuum: factor out the fast vacuuming run into ctdb_vacuum_db_fast()
for readability

(This used to be ctdb commit 6596f2c4a6b4783b6498502fbbf50f87d4f59085)
2011-12-23 17:39:07 +01:00
Michael Adam
61b336f230 vacuum: rename delete_tree to delete_list
It is not important for the user that this is implemented as a tree.

(This used to be ctdb commit f686bc440560074c1ce866f2037ae3671f182185)
2011-12-23 17:39:07 +01:00
Michael Adam
f96f183ad1 vacuum: appropriately rename vdata.list to vdata.vacuum_fetch_list
(This used to be ctdb commit 09c55b76c96c4ab3fe812763007b81cf0a2ac86c)
2011-12-23 17:39:06 +01:00
Michael Adam
d96df1c374 vacuum: introduce a helper variable for the vacuum fetch list in ctdb_vacuum_db()
(This used to be ctdb commit 019106e035520e6b3e5702b6e76d910626c3df13)
2011-12-23 17:39:06 +01:00
Michael Adam
c9b5396783 vacuum: introduce a helper variable in add_record_to_vacuum_fetch_list() to reduce verbosity
(This used to be ctdb commit 48fe56ea27e3649ae7a67257fdce54f973e7c3c5)
2011-12-23 17:39:06 +01:00
Michael Adam
c7b885c1c9 vacuum: locally delete the records in the delete_tree that have be deleted remotely
This way, especially records added in the fast vacuuming runs
are deleted direclty instead of being handed back to the
repack run which will probably not hit because of the vacuum limit.

(This used to be ctdb commit ea3e640a28178ddcb85285f4efec62ccba2483d9)
2011-12-23 17:39:05 +01:00
Michael Adam
aa04a64679 vacuum: improve vacuuming statistics for handling the delete_tree.
Track the number of records failed to delete remotely with the
TRY_DELETE_RECORDS control.
And add a number of records left to delete locally.

(This used to be ctdb commit 536aad024d52f2c32dd397fc86294c963b91341b)
2011-12-23 17:39:04 +01:00
Michael Adam
1c0bc40961 vacuum: fix and improve a comment
(This used to be ctdb commit 0ed349c24c7399b3b440c1f5d573db77ddb988b3)
2011-12-23 17:39:04 +01:00
Michael Adam
b09bd3e841 vacuum: appropriately rename delete_traverse() to delete_marshall_traverse()
(This used to be ctdb commit 7c5b27bc8dce9e30f2aff05297113da981f7b9a3)
2011-12-23 17:39:04 +01:00
Michael Adam
745eb05e02 vacuum: initialize the delete_count in the vacuum data
(This used to be ctdb commit 970b8fc60857ad2f18f45312d355c571fb2f0246)
2011-12-23 17:39:03 +01:00
Michael Adam
e30d1828f1 vacuum: fix the VacuumInterval tunable's type to uint32_t in get_vacuum_interval()
(This used to be ctdb commit a5a29bf92b23e9b5a1523b06461eced422b22ffe)
2011-12-23 17:39:03 +01:00
Michael Adam
e04fad0ee4 vacuum: add new tunable VacuumInterval and mark Vacuum{Default,Min,Max}Interval obsolete
And use VacuumInterval instead of VacuumDefaultInterval in the code.

(This used to be ctdb commit 78530f40338f511a7cd1d33ada450905742bfa8f)
2011-12-23 17:39:02 +01:00
Michael Adam
1ca3abc5ba vacuum: remove struct vacuum_tuning_data (unused)
(This used to be ctdb commit 1f62afbe1ae0b3e7dbad4081d1b51e3ab6ee5c39)
2011-12-23 17:39:02 +01:00
Michael Adam
9cae401943 vacuum: use get_vacuum_interval() in ctdb_vacuum_event()
(instead of using the tunable directly)

(This used to be ctdb commit e40fa9efd1c77aa35c917aba6e6e4d21d9c5cdea)
2011-12-23 17:39:02 +01:00
Michael Adam
19bbee2acd vacuum: change get_vacuum_interval() to simply return the VacuumDefaultInterval tunable
(This used to be ctdb commit 621c3ce957cb946ca05a2d527c037746ae2f01d3)
2011-12-23 17:39:01 +01:00
Michael Adam
87351d8801 vacuum: remove update_tuning_db()
(This used to be ctdb commit d93750ea3f5cb854e5893e53795fd08656e7c12c)
2011-12-23 17:39:01 +01:00
Michael Adam
a481ca711f vacuum: add ctdb_local_remove_from_delete_queue()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit a5065b42a98c709173503e02d217f97792878625)
2011-12-23 17:39:00 +01:00
Michael Adam
edc6067339 vacuum: update (C) from vacuum rewrite
(This used to be ctdb commit a95b524e57b861416f65baef7a0235bf7e394cef)
2011-11-26 01:10:09 +01:00
Michael Adam
0c1e98c9b0 vacuum: write a big and up-to-date explaining comment for ctdb_vacuum_db()
(This used to be ctdb commit 6b9d308985ef2363c62fde6340ad37d56f6d7702)
2011-11-26 00:34:57 +01:00
Michael Adam
a4988be457 vacuum: fix a comment typo in vacuum_traverse()
(This used to be ctdb commit 88ad1e75c686cd47aec18b0a8eb93c3b125f0e97)
2011-11-26 00:34:57 +01:00
Michael Adam
f14b730adb vacuum: fix horrible indentation/whitespacing for ctdb_vacuum_event()
(This used to be ctdb commit 0f070a65a322bd6d3240ca96a9e5c3633ef647bf)
2011-11-26 00:34:57 +01:00
Michael Adam
ac2bf0ebf4 vacuum: fix a comment typo in vacuum_traverse()
(This used to be ctdb commit 39a5c0d8cca4ce5e8bc7055739a6377fb2dc36e0)
2011-11-26 00:34:56 +01:00
Michael Adam
586d8f6883 vacuum: fix an abundance of indentation white spaces in ctdb_vacuum_db()
(This used to be ctdb commit 4ae564e415560cde7e4cd4c5a1d7699f3d49621b)
2011-11-26 00:34:56 +01:00
Michael Adam
018095b64d vacuum: rename "size" to "freelist_size" for clarity
(This used to be ctdb commit 057023f5843c91d1cf8512f3675a01a119ea6157)
2011-11-26 00:34:56 +01:00
Ronnie Sahlberg
0f92fa224c RB_TREE: Add mechanism to abort a traverse
This patch changes the callback signature for traversal
functions to allow a client to abort a traverse before it finishes.
Updates to all callers and examples as well as rb-test tool.

(This used to be ctdb commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)
2011-11-08 13:40:28 +11:00
Mathieu Parent
a5a6140b7e Correction of spelling errors
* continous -> continuous
* activete  -> activate

(thanks to lintian)

See https://bugzilla.samba.org/show_bug.cgi?id=6935

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit fb6987c2f747d6dbf9bb3899a480124d1c242a90)
2011-03-23 00:35:23 +01:00
Ronnie Sahlberg
1e001d4220 Vacuuming: initialize a variable to avoid a harmless valgrind hit
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit ad709e99bcad7a4884f2336663d161ba61307ae5)
2011-03-14 13:35:53 +01:00
Michael Adam
3e0d4f8f73 vacuum: fix a comment typo
(This used to be ctdb commit a16dc65b4602da5ce2c16578bec2e7882aff240d)
2011-03-14 13:35:52 +01:00
Michael Adam
fe852ca337 vacuum: use insert_record_into_delete_queue in ctdb_local_schedule_for_deletion.
This is to take advantage of the hash collision handling and logging
also in ctdb_local_schedule_for_deletion.

(This used to be ctdb commit 52193b6692091e341ed7a81dbd9a61ae49a8aac5)
2011-03-14 13:35:52 +01:00
Michael Adam
74f65b6ca6 vacuum: refactor insert_record_into_delete_queue out of ctdb_control_schedule_for_deletion
(This used to be ctdb commit be4b63ee18933524f780df5c313447e5ef0786d1)
2011-03-14 13:35:52 +01:00
Michael Adam
dd1a98e76b vacuum: raise a debug level from INFO to DEBUG
when overwriting an existing entry in the delete_queue.

(This used to be ctdb commit f28e636cc4a04ef982672d5f569ad6b6b963db1f)
2011-03-14 13:35:52 +01:00
Michael Adam
50bd249990 vacuum: add ctdb_local_schedule_for_deletion()
(This used to be ctdb commit b70bc141d84f7355d2c6c901961b7366db566980)
2011-03-14 13:35:49 +01:00
Michael Adam
8569fcbc83 server: implement a new control SCHEDULE_FOR_DELETION to fill the delete_queue.
(This used to be ctdb commit 680223074e992b32ccf6f42cb80c3fa93074fee7)
2011-03-14 13:35:49 +01:00
Michael Adam
a5cb537745 vacuum: lower level of hash collision debug message to INFO
(This used to be ctdb commit b9bdef46fedfbc543263b67cfee3e896773cd8e8)
2011-03-14 13:35:49 +01:00
Michael Adam
122682be63 vacuum: add statistics output to the fast and full traverse runs.
(This used to be ctdb commit 3addd28aa73883b3b05888e309d19db0eb67eab9)
2011-03-14 13:35:49 +01:00
Michael Adam
e8b08ce702 vacuum: refactor insert_delete_record_data_into_tree() out of add_record_to_delete_tree()
for reuse in filling the delete_queue.

(This used to be ctdb commit 7bbb12695c24da25671f1c39a411295d35870d2c)
2011-03-14 13:35:48 +01:00
Michael Adam
c95b4f841b vacuum: disable full db-traverse vacuuming runs when VacuumFastPathCount == 0
(This used to be ctdb commit 571683e7c48aeed8ce41c584d016ced7ff0d2e2d)
2011-03-14 13:35:48 +01:00
Michael Adam
28fdb00a22 vacuum: Only run full vacuumig (db traverse) every VacuumFastPathCount times.
(This used to be ctdb commit 23b8c8c5fc8604ee0bd6da1f4b5152277eb5f1c0)
2011-03-14 13:35:48 +01:00
Michael Adam
cab1f75db5 vacuum: reset the fast path count in the event handle if it exceeds the limit.
(This used to be ctdb commit 91e6d36a190b1c9e4c8b18f7833e51c5c9a67574)
2011-03-14 13:35:48 +01:00
Michael Adam
f502e5aa98 vacuum: bump the number of fast-path runs in the vacuum child destructor
(This used to be ctdb commit c0668bfe0bb4e69988ae34d875568d08539e6fb9)
2011-03-14 13:35:47 +01:00
Michael Adam
3c4c560019 vacuum: add a fast_path_count to the vacuum_handle.
(This used to be ctdb commit 53a39d0cc5ea251c2189ec8178ccb769fa046c43)
2011-03-14 13:35:47 +01:00
Michael Adam
8395fcc079 vacuum: traverse the delete_queue befor traversing the database.
(This used to be ctdb commit 04c335f9195a5fd83c91a57d06b1e4eaa511844e)
2011-03-14 13:35:47 +01:00
Michael Adam
bb22135f28 vacuum: add delete_queue_traverse() for traversal of the delete_queue.
(This used to be ctdb commit 5eee05c4d256c08f4ee60a1a69efda6844e39729)
2011-03-14 13:35:47 +01:00
Michael Adam
08ab829f0b vacuum: reduce indentation in add_record_to_delete_tree()
This simplyfies the logical structure a bit by using early return.

(This used to be ctdb commit 4d32908fdcec120426536a761e1d0be60f076198)
2011-03-14 13:35:47 +01:00
Michael Adam
6a1857ee70 vacuum: refactor new add_record_to_delete_tree() out of vacuum_traverse().
This will be reused by the traversal of the delete_queue list.

(This used to be ctdb commit 4407e5a7fb045ce56b6d902f7116de663ea648cb)
2011-03-14 13:35:46 +01:00
Michael Adam
d331d7a7b3 vacuum: skip adding records to list of records to send to lmaster on lmaster
This list is skipped afterwards when the lists are processed.

(This used to be ctdb commit e99834c1a2eea60f7f974c0689ae0a65cfe178ff)
2011-03-14 13:35:46 +01:00
Michael Adam
3d7bfc7a3e vacuum: refactor new add_record_to_vacuum_fetch_list() out of vacuum_traverse().
This is the function that fills the list of records to send to each lmaster
with the VACUUM_FETCH message.

This function will be reused in the traverse function for the delete_queue.

(This used to be ctdb commit d4ab790c1f679e833eb97816762fcfcee15ccb10)
2011-03-14 13:35:46 +01:00
Michael Adam
ee593284d5 server: rename ctdb_repack_db() to ctdb_vacuum_and_repack_db()
(This used to be ctdb commit 6c603f85726d2efac9710af7c4875ded2ca7230e)
2011-03-14 13:35:46 +01:00
Michael Adam
6a1cfe82f1 vaccum: clear the fast-path vacuuming delete_queue after creating the vacuuming child.
Maybe we should keep a copy for the case that the vacuuming fails?

(This used to be ctdb commit f19fe5b45748a6998c6950a5b1db7ec2c4468c1c)
2011-03-14 13:35:45 +01:00
Michael Adam
3cb3620acf vacuum: check lmaster against num_nodes instead of vnn_map->size
When lmaster is bigger than the biggest recorded node number,
then exit the traverse with error.

(This used to be ctdb commit 3930c7796b72bbf275bbca8aaeceec3e705a964b)
2011-03-14 13:35:43 +01:00
Michael Adam
dd75ae8c15 vacuum: reduce indentation of the loop sending VACUUM_FETCH controls
This slightly improves the code structure in that loop.

(This used to be ctdb commit bc4990e600c53433a924a0d70e3488a5a6bdc1ff)
2011-03-14 13:35:43 +01:00
Michael Adam
70fa7394fa vacuum: correctly send TRY_DELETE_RECORDS ctrl to all active nodes
Originally, the control was sent to all records in the vnn_map, but
there was something still missing here:
When a node can not become lmaster (via CTDB_CAPABILITY_LMASTER=no)
then it will not be part of the vnn_map. So such a node would
be active but never receive the TRY_DELETE_RECORDS control from a
vacuuming run.

This is fixed in this change by correctly building the list of
active nodes first in the same way that the recovery process does it.

(This used to be ctdb commit 49247df4a47a8a107fa7dd7b187e69e243e6bdbe)
2011-03-14 13:35:43 +01:00
Michael Adam
33b5d9c1a1 vacuum: in ctdb_vacuum_db, fix the length of the array of vacuum fetch lists
This patch fixes segfaults in the vacuum child when at least one
node has been stopped or removed from the cluster:

The size of the vnn_map is only the number of active nodes
(that can be lmaster). But the node numbers that are referenced
by the vnn_map spread over all configured nodes.

Since the array of vacuum fetch lists is referenced by the
key's lmaster's node number later on, the array needs to
be of size num_nodes instad of vnn_map->size.

(This used to be ctdb commit 136508e3f4dd0acc210dde938ad59ef38b63d3a1)
2011-03-11 23:00:51 +01:00
Michael Adam
8d49f4878c Fix typos in a comment in vacuum_traverse.
(This used to be ctdb commit 6a4df8242ee4d095ff03229a168b83bcd84c8a7a)
2011-03-09 21:14:14 +01:00
Ronnie Sahlberg
c4006ce844 Add ctdb_fork(0 which will fork a child process and drop the real-time
scheduler for the child.

Use ctdb_fork() from callers where we dont want the child to be running
at real-time privilege.

(This used to be ctdb commit 58795a4c9e0624e20fa3e0023b65127053edd103)
2011-01-11 07:40:41 +11:00
Ronnie Sahlberg
ef2e8d3c95 If tdb_open() fails when trying to open the vacuuming database,
print errno so we get some idea of why this failed.

(This used to be ctdb commit 3695462ade497356d1b86c6fd1bc1765f1d11e57)
2010-10-14 14:03:19 +11:00
Ronnie Sahlberg
f98ffde65a Dont log a normal vacuuming message about a missing record and using default vacuuming intervals as an error.
This is normal for a new system until the vacuuming has been initialized.

(This used to be ctdb commit ffd5fdd23b1cb07078759a78cd1d884f92aa4851)
2010-10-07 14:40:24 +11:00
Ronnie Sahlberg
2e8aac6689 Merge commit 'rusty/ports-from-1.0.112' into foo
(This used to be ctdb commit 13e58d92f5f1723e850a82ae030d0ca57e89b1ee)
2010-08-19 13:17:56 +10:00
Ronnie Sahlberg
4c05f1900c Merge commit 'rusty/vacuum-fix-master'
(This used to be ctdb commit dc301b324d2c14a2425a965c076113c4fe97903e)
2010-08-19 13:16:35 +10:00
Rusty Russell
9fbb191b78 logging: give a unique logging name to each forked child.
This means we can distinguish which child is logging, esp. via syslog where we have no pid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 68b3761a0874429b90731741f0531f76dcfbb081)
2010-08-18 11:46:32 +09:30
Rusty Russell
5f2d43157d vacuum: disabling vacuuming during a freeze
We shouldn't even think about vacuuming when we've frozen the database
(which is earlier than when we set CTDB_RECOVERY_ACTIVE)

CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit d8df6835a931082af232c4b94f1dede6f16169f9)
2010-08-18 11:01:52 +09:30
Rusty Russell
0b07f91d36 vacuum: fix crash on vacuum abort
Martin Schwenke discovered that 517f05e42f17766b1e8db8f1f4789cbad968e304
("freeze: abort vacuuming when we're going to freeze.") used ctdb_db for
a logging message which is in fact uninitialized, causing a crash (even
if it wasn't actually logged).

Initialize it properly.  Also fix incorrect format in another logging
message introduced in that same change.

CQ:S1019093
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 8e518950ba281502318d6300f7a5ec6cdf6b5674)
2010-08-18 11:00:11 +09:30
Rusty Russell
af55c910a4 freeze: abort vacuuming when we're going to freeze.
There are some reports of freeze timeouts, and it looks like vacuuming might
be the culprit.  So we add code to tell them to abort when a freeze is
going on.

(This is based on the 1.0.112 branch version 517f05e42f, but far
 simpler since tdb is now robust against processes being killed during
 transaction commit)

CQ:S1018154 & S1018349
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit f5d7dc679501e607c2c83a248a89d3cada9df146)
2010-08-18 10:54:28 +09:30
Rusty Russell
f93440c4b7 event: Update events to latest Samba version 0.9.8
In Samba this is now called "tevent", and while we use the backwards
compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now
a separate tevent_fd_set_auto_close() function.

This is based on Samba version 7f29f817fa.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


(This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
2010-08-18 09:16:31 +09:30
Ronnie Sahlberg
761a075de9 rename ctdb_send_message to ctdb_client_send_message to resolve colission with the function of the same name in libctdb
(This used to be ctdb commit ac3292c12832484a22715f1d46aa23f3b7c8a6f6)
2010-06-02 09:45:21 +10:00
Christian Ambach
3cf183ca40 adjust a vacuum log level
made the severity of the decreasing interval log level the same as for the increasing,
they are both just info logs because they don't report errors

(This used to be ctdb commit fde29921f14a815ea68911d758485c9070f4eb2a)
2010-03-11 18:11:57 +11:00
Ronnie Sahlberg
d7c00d8d7e Drop the debug level for logging fd creation to DEBUG_DEBUG
(This used to be ctdb commit eae1d4f9e52e73b4d8769868fffdafa590d03784)
2010-02-04 06:37:41 +11:00
Ronnie Sahlberg
4c722fe34c fix a conflict in the merge from rusty
Merge commit 'rusty/ctdb-no-setsched'

Conflicts:

	server/ctdb_vacuum.c

(This used to be ctdb commit b4365045797f520a7914afdb69ebd1a8dacfa0d9)
2009-12-17 08:18:04 +11:00
Rusty Russell
f148735928 Add --valgringing flag instead of --nosetsched
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)
2009-12-16 20:59:15 +10:30
Stefan Metzmacher
7f05a423e2 server: create vactune.tdb.X with 0600 permissions
metze

(This used to be ctdb commit 21677ed6fb8c589f348321533c608cad58c4ec93)
2009-12-16 08:03:56 +01:00
Stefan Metzmacher
473f02ed48 server: create vactun.tdb.X under /var/ctdb/state
metze

(This used to be ctdb commit 1db17f312558fe59983a3465680e56c9f0c19e36)
2009-12-16 08:03:56 +01:00
Stefan Metzmacher
003985acfd ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open calls
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit 1635e931b909c66eb3b1f5357e3a549b1a0da70d)
2009-12-16 08:03:55 +01:00
Christian Ambach
47f8c380d2 reduce vacuuming lognoise
syslog.h says:

LOG_NOTICE      5    normal but significant condition
LOG_INFO        6    informational

several vacuuming related logs logged at NOTICE level although I don't see
any real significance, these are just informational messages for me

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>

(This used to be ctdb commit 142111983c103e90ccccbe26fd580c4eb28e949f)
2009-12-10 07:33:59 +11:00
Ronnie Sahlberg
a3d072049e reduce the log level for three vacuuming related log messages
(This used to be ctdb commit fbc453733d53359b9eba34a7ca9123237a7ecca5)
2009-11-24 09:27:22 +11:00
Ronnie Sahlberg
d8f7fd88ac dont use the pointer after it has been talloc_free()d.
(This used to be ctdb commit 1cbf06a126621b3e932925cdad2ef9c009f93d4e)
2009-11-05 16:07:23 +11:00
Ronnie Sahlberg
4bf4e15379 move the check to skip vacuuming on persistent database to the ctdb_vacuuming_init() function
(This used to be ctdb commit fb83dba255fc91413a475b273e374e0c4d538137)
2009-11-03 10:48:27 +11:00
Wolfgang Mueller-Friedt
2c137b7030 vacuuming needed additional check before getting rid of the record; there is a gap between selecting the records and deleting them, therefore we have to check if the records still can be deleted when we actually are about to delete them
(This used to be ctdb commit a6fbc65aca35c41c428a82d7402e43c6eaac1d6e)
2009-10-29 13:45:17 +11:00
Ronnie Sahlberg
5aaa15fdb2 lower the log level of a debug message
(This used to be ctdb commit 496dc2e80b714811c6e69dc928deaad61cf603b1)
2009-10-26 09:35:18 +11:00
Ronnie Sahlberg
28f277acd4 From Wolfgang Mueller
make sure to always create the vactun database and get rid of some annoying log messages

(This used to be ctdb commit 54f9c314a0354f1039208fe6ac7dc159b6db8750)
2009-10-20 13:01:15 +11:00
Ronnie Sahlberg
9de3652380 add logging everytime we create a filedescriptor in the main ctdb daemon
so we can spot if there are leaks.

plug two leaks for filedescriptors related to when sending ARP fail
and one leak when we can not parse the local address during tcp connection establish

(This used to be ctdb commit ddd089810a14efe4be6e1ff3eccaa604e4913c9e)
2009-10-15 11:24:54 +11:00
Ronnie Sahlberg
c971d934a9 From Wolfgang Mueller-Friedt
Remove the explicit vacuum/repack commands from the 00.ctdb eventscript
and implement this in the ctdb daemon.

Combine vacuuming and repacking into one
cheap read traverse to enumerate all candidate records
and one write traverse that both repacks the database and also deletes the record locally where we are lmaster and where the records have already been deleted remotely.

this code also adds initial autotuning heuristics for the vacuum intervals and how many records to delete in each iteration.

minor stylish changes made by ronnie s

(This used to be ctdb commit 95a3ee551241aa164967991fe5efe078e1714bde)
2009-09-29 13:27:19 +10:00
Wolfgang Mueller-Friedt
16af87bf25 repack limit tunable
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>

(This used to be ctdb commit a2768b0732f2ab2e3fafda55587bd2e99eedf0fa)
2009-07-29 13:30:39 +10:00
Wolfgang Mueller-Friedt
fddfaaaa4b added event repacking
Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel@de.ibm.com>

(This used to be ctdb commit 78466364f22d6a183710338f138b8c808c6b7753)
2009-07-29 13:28:48 +10:00
Ronnie Sahlberg
1653af16a6 vacuum event framework
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)
2009-07-29 13:26:29 +10:00