summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_call.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-07-31 15:59:11 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-08-09 11:07:37 +1000
commita98baa539ec586b249fe5c4526dd66d81131d516 (patch)
tree656753d0c844a589059377c424b633b8bfef38be /ctdb/server/ctdb_call.c
parentd42cea6efe28f3277c62a5bf8ccb8060df14ef8b (diff)
downloadsamba-a98baa539ec586b249fe5c4526dd66d81131d516.tar.gz
ctdbd: When a record is made sticky, log only once
Instead of logging from ctdb_request_call(), log the message from ctdb_make_record_sticky(). That way if the record is already sticky, the message is not repeated unnecessarily. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 44a64d1c388bfe3c3388b191edfaedecfb7bb831)
Diffstat (limited to 'ctdb/server/ctdb_call.c')
-rw-r--r--ctdb/server/ctdb_call.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index d5b6b21a3c9..6288ff2c493 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -564,7 +564,9 @@ ctdb_make_record_sticky(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_
sr->ctdb_db = ctdb_db;
sr->pindown = NULL;
- DEBUG(DEBUG_ERR,("Make record sticky in db %s\n", ctdb_db->db_name));
+ DEBUG(DEBUG_ERR,("Make record sticky for %d seconds in db %s key:0x%08x.\n",
+ ctdb->tunable.sticky_duration,
+ ctdb_db->db_name, ctdb_hash(&key)));
trbt_insertarray32_callback(ctdb_db->sticky_records, k[0], &k[0], ctdb_make_sticky_record_callback, sr);
@@ -922,7 +924,6 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
should make it sticky.
*/
if (ctdb_db->sticky && c->hopcount >= ctdb->tunable.hopcount_make_sticky) {
- DEBUG(DEBUG_ERR, ("Hot record in database %s. Hopcount is %d. Make record sticky for %d seconds\n", ctdb_db->db_name, c->hopcount, ctdb->tunable.sticky_duration));
ctdb_make_record_sticky(ctdb, ctdb_db, call->key);
}