summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* server: implement a new control SCHEDULE_FOR_DELETION to fill the delete_queue.Michael Adam2011-03-143-0/+86
| | | | (This used to be ctdb commit 680223074e992b32ccf6f42cb80c3fa93074fee7)
* control: add a new control opcode CTDB_CONTROL_SCHEDULE_FOR_DELETIONMichael Adam2011-03-141-0/+1
| | | | (This used to be ctdb commit 4cebfa33db3c7effa087f753530c52b2dd8550e6)
* control: add macro CHECK_CONTROL_MIN_DATA_SIZE.Michael Adam2011-03-141-0/+8
| | | | | | | This is for the control dispatcher to check whether the input data has a required minimum size. (This used to be ctdb commit 2038e745db33cc5c3b4e2db8a00a57ede03906a2)
* vacuum: lower level of hash collision debug message to INFOMichael Adam2011-03-141-1/+1
| | | | (This used to be ctdb commit b9bdef46fedfbc543263b67cfee3e896773cd8e8)
* vacuum: add statistics output to the fast and full traverse runs.Michael Adam2011-03-141-5/+102
| | | | (This used to be ctdb commit 3addd28aa73883b3b05888e309d19db0eb67eab9)
* vacuum: refactor insert_delete_record_data_into_tree() out of ↵Michael Adam2011-03-141-16/+39
| | | | | | | | add_record_to_delete_tree() for reuse in filling the delete_queue. (This used to be ctdb commit 7bbb12695c24da25671f1c39a411295d35870d2c)
* vacuum: change all Vacuum*Interval tunables to default to 10Michael Adam2011-03-141-3/+3
| | | | | | | So, by default we have a fastpath vacuuming every 10 seconds and full blown db-traverse vacuuming once every 10 minutes. (This used to be ctdb commit 4f0ace982dbb5b4f9c035dbf4cb0ae74cd18d81b)
* vacuum: disable full db-traverse vacuuming runs when VacuumFastPathCount == 0Michael Adam2011-03-141-1/+3
| | | | (This used to be ctdb commit 571683e7c48aeed8ce41c584d016ced7ff0d2e2d)
* vacuum: Only run full vacuumig (db traverse) every VacuumFastPathCount times.Michael Adam2011-03-141-9/+25
| | | | (This used to be ctdb commit 23b8c8c5fc8604ee0bd6da1f4b5152277eb5f1c0)
* vacuum: reset the fast path count in the event handle if it exceeds the limit.Michael Adam2011-03-141-0/+4
| | | | (This used to be ctdb commit 91e6d36a190b1c9e4c8b18f7833e51c5c9a67574)
* vacuum: bump the number of fast-path runs in the vacuum child destructorMichael Adam2011-03-141-0/+3
| | | | (This used to be ctdb commit c0668bfe0bb4e69988ae34d875568d08539e6fb9)
* vacuum: add a fast_path_count to the vacuum_handle.Michael Adam2011-03-141-0/+1
| | | | (This used to be ctdb commit 53a39d0cc5ea251c2189ec8178ccb769fa046c43)
* Add a tunable VacuumFastPathCount.Michael Adam2011-03-142-0/+2
| | | | | | | | This will control how many fast-path vacuuming runs wil have to be done, before a full vacuuming will be triggered, i.e. one with a db-traversal. (This used to be ctdb commit 0d997ec7e61a7bee2cb05456f9c7d5e6f7a44797)
* vacuum: traverse the delete_queue befor traversing the database.Michael Adam2011-03-141-0/+6
| | | | (This used to be ctdb commit 04c335f9195a5fd83c91a57d06b1e4eaa511844e)
* vacuum: add delete_queue_traverse() for traversal of the delete_queue.Michael Adam2011-03-141-0/+116
| | | | (This used to be ctdb commit 5eee05c4d256c08f4ee60a1a69efda6844e39729)
* vacuum: reduce indentation in add_record_to_delete_tree()Michael Adam2011-03-141-20/+20
| | | | | | This simplyfies the logical structure a bit by using early return. (This used to be ctdb commit 4d32908fdcec120426536a761e1d0be60f076198)
* vacuum: refactor new add_record_to_delete_tree() out of vacuum_traverse().Michael Adam2011-03-141-35/+45
| | | | | | This will be reused by the traversal of the delete_queue list. (This used to be ctdb commit 4407e5a7fb045ce56b6d902f7116de663ea648cb)
* vacuum: skip adding records to list of records to send to lmaster on lmasterMichael Adam2011-03-141-4/+7
| | | | | | This list is skipped afterwards when the lists are processed. (This used to be ctdb commit e99834c1a2eea60f7f974c0689ae0a65cfe178ff)
* vacuum: refactor new add_record_to_vacuum_fetch_list() out of vacuum_traverse().Michael Adam2011-03-141-23/+44
| | | | | | | | | 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)
* server: rename ctdb_repack_db() to ctdb_vacuum_and_repack_db()Michael Adam2011-03-141-2/+3
| | | | (This used to be ctdb commit 6c603f85726d2efac9710af7c4875ded2ca7230e)
* When wiping a database, clear the delete_queue.Michael Adam2011-03-141-0/+11
| | | | (This used to be ctdb commit 731a6011ce4a1301f86eacb039955745f2b5d866)
* vaccum: clear the fast-path vacuuming delete_queue after creating the ↵Michael Adam2011-03-141-0/+11
| | | | | | | | vacuuming child. Maybe we should keep a copy for the case that the vacuuming fails? (This used to be ctdb commit f19fe5b45748a6998c6950a5b1db7ec2c4468c1c)
* When attaching to a non-persistent DB, initialize the delete_queue.Michael Adam2011-03-141-0/+8
| | | | (This used to be ctdb commit 0aff1b61dd1b683c6739478008a5b014b933df50)
* Add a delete_queue to the ctdb database context struct.Michael Adam2011-03-141-0/+1
| | | | | | | | | This list will be filled by the client using a new delete control. The list will then be used to implement a fast-path vacuuming that will traverse this list instead of traversing the database. (This used to be ctdb commit 9bbedf786b26bb074f668b31f29a9032af958673)
* call: becoming dmaster in VACUUM_MIGRATION, set the VACUUM_MIGRATED record flagMichael Adam2011-03-141-1/+14
| | | | | | | | | This temporary flag is used for the local record storage function to decide whether to delete an empty record which has never been migrated with data as part of the fast-path vacuuming process or, or to store the record. (This used to be ctdb commit c11ca778ee90444c44dee0a629cd2eefa3a1f75e)
* call: hand the submitted record_flags to local record storage function.Michael Adam2011-03-141-0/+1
| | | | (This used to be ctdb commit 4079b8bf7a57a27a45d29784a1b0a414c778e552)
* call: transfer the record flags in the ctdb call packets.Michael Adam2011-03-141-6/+26
| | | | | | | | | | | | | This way, the MIGRATED_WITH_DATA information can be transported along with the records. This is important for vacuuming to function properly. The record flags are appended to the data section of the ctdb_req_dmaster and ctdb_reply_dmaster structs. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 945187d64cfc7bd30a0c3b0d548cbe582d95dde3)
* server: in the VACUUM_FETCH handler, add the VACUUM_MIGRAION to the call flagsMichael Adam2011-03-141-0/+1
| | | | | | | | This way, the records coming in via this handler, can be treated appropriately. Namely, they can be deleted instead of being stored when the meet the fast-path vacuuming criteria (empty, never migrated with data...) (This used to be ctdb commit fb5d832104970320359b3e474eb291ca3d629380)
* add a new record flag CTDB_REC_FLAG_VACUUM_MIGRATED.Michael Adam2011-03-141-0/+1
| | | | | | | | | | | | This is to be used internally. The purpose is to flag a record as been migrated by a VACUUM_MIGRATION, which is triggered by a VACUUM_FETCH message as part of the vacuuming. The local store routine will base its decision whether to delete or to store the record (among other things) upon the value of this flag. This flag should never be stored in the local database copies. (This used to be ctdb commit dd2449c422f323f9b5485e45107a9cc5acc09e08)
* call: Move definition of call flags down to the definition of the flags field.Michael Adam2011-03-141-2/+2
| | | | (This used to be ctdb commit 86c844fb08a7fd33e94f56b8d5e43278120e1162)
* call: add new call flag CTDB_CALL_FLAG_VACUUM_MIGRATIONMichael Adam2011-03-141-0/+1
| | | | | | | | | This is to be used when the CTDB_SRVID_VACUUM_FETCH message triggers the migration of deleted records to the lmaster. The lmaster can then delete records that have not been migrated with data instead of storing them. (This used to be ctdb commit 455cc6616e10b7f09589f9b87cb60f591bb502b0)
* recoverd: in a recovery, set the MIGRATED_WITH_DATA flag on all recordsMichael Adam2011-03-141-0/+1
| | | | | | | | | | Those records that are kept after recovery, are non-empty, and stored identically on all nodes. So this is as if they had been migrated with data. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 101be642e492a3a54231e2e3e6553a59380fe702)
* server: when we migrate off a record with data, set the MIGRATED_WITH_DATA flagMichael Adam2011-03-141-0/+4
| | | | (This used to be ctdb commit f5fb232117886186066ab3430fdd2307cba94960)
* vacuum: check lmaster against num_nodes instead of vnn_map->sizeMichael Adam2011-03-141-2/+8
| | | | | | | When lmaster is bigger than the biggest recorded node number, then exit the traverse with error. (This used to be ctdb commit 3930c7796b72bbf275bbca8aaeceec3e705a964b)
* vacuum: reduce indentation of the loop sending VACUUM_FETCH controlsMichael Adam2011-03-141-16/+21
| | | | | | This slightly improves the code structure in that loop. (This used to be ctdb commit bc4990e600c53433a924a0d70e3488a5a6bdc1ff)
* vacuum: correctly send TRY_DELETE_RECORDS ctrl to all active nodesMichael Adam2011-03-141-9/+28
| | | | | | | | | | | | | | 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)
* vacuum: in ctdb_vacuum_db, fix the length of the array of vacuum fetch listsMichael Adam2011-03-111-8/+10
| | | | | | | | | | | | | | | 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)
* Fix typos in a comment in vacuum_traverse.Michael Adam2011-03-091-1/+1
| | | | (This used to be ctdb commit 6a4df8242ee4d095ff03229a168b83bcd84c8a7a)
* tests: fix segfault in store test when connection to ctdbd failed.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 43a15d2906b3f9d08af234f55a3a0f614571d3a7)
* tests: fix segfault in fetch_one test when connection to ctdbd failsMichael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 89c8e52de3878b8e29c6a24725eb66c18fd1f52a)
* tests: fix segfault in fetch test when connection to ctdb failed.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit f493eb31abf956fd38347c2ff77026e380a9664d)
* tests: fix segfault in randrec test when connection to daemon fails.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 715999d7ffbf10f3a57de3ee08a293165333553a)
* gitignore: add tags fileMichael Adam2011-03-091-0/+1
| | | | (This used to be ctdb commit 1e2ff096b78d160f5c535bccfc5482830372fd56)
* gitignore: add vi swap filesMichael Adam2011-03-091-0/+1
| | | | (This used to be ctdb commit ac4dad619111e7153fe66eb2713f3b2ce63d3999)
* Restart recovery dameon if it looks like it hung.Ronnie Sahlberg2011-03-071-10/+2
| | | | | | Dont shutdown ctdbd completely, that only makes the problem worse. (This used to be ctdb commit 221ecc2509f6d267d1854c1042ff945a620510bb)
* If/when the recovery daemon terminates unexpectedly, try to restart it again ↵Ronnie Sahlberg2011-03-011-10/+15
| | | | | | | | from the main daemon instead of just shutting down the main deamon too. While it does not address the reason for recovery daemon shutting down, it reduces the impact of such issues and makes the system more robust. (This used to be ctdb commit 0566ef3d6cef809bda204877c493c80ff9eb2c40)
* ATTACH_DB: simplify the code slightly and change the semantics to onlyRonnie Sahlberg2011-03-011-7/+4
| | | | | | | | | | refuse a db attach during recovery IF we can associate the request from a genuine real client instead of deciding this on whether client_id is zero or This will suppress/avoid messages like these : DB Attach to database %s refused. Can not match clientid... (This used to be ctdb commit b05ccf366df985e0a3365aacc75761ebd438deaf)
* Deferred attach : at early startup, defer any db attach calls until we are ↵Ronnie Sahlberg2011-03-015-15/+119
| | | | | | out of recovery. (This used to be ctdb commit eeaabd579841f60ab2c5b004cbbb1f5de2bfe685)
* Dont return error if trying to set db priority on a db that does not yet exist.Ronnie Sahlberg2011-02-251-2/+2
| | | | | | | | Just treat as a nop. When the database is created later it will get its priority set properly. (This used to be ctdb commit 05c934b10ad2690be9d75c9033a0b849bf16455d)
* server: add a comment explaining the call redirect logic in ↵Michael Adam2011-02-241-3/+24
| | | | | | ctdb_call_send_redirect(). (This used to be ctdb commit 81663b81687c0ba681500cca6aa8174bb9587ad2)