summaryrefslogtreecommitdiff
path: root/ctdb/server/ctdb_call.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-07-15 16:32:40 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-07-30 15:34:32 +1000
commit0993387f4a440b41b33307d1eac7f24f97079ef5 (patch)
tree8828c4c4f77f6c2a7b662b5e39ca8168bd8873c5 /ctdb/server/ctdb_call.c
parent054d8727edd3b0a1d328a9599e7fe392f7fc7bd6 (diff)
downloadsamba-0993387f4a440b41b33307d1eac7f24f97079ef5.tar.gz
ctdbd: Don't consider a hot record if the hopcount is zero
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ab35773518ad15588013f4d859f7bee790437450)
Diffstat (limited to 'ctdb/server/ctdb_call.c')
-rw-r--r--ctdb/server/ctdb_call.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index 6d144efd611..87209fd8d21 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -697,6 +697,9 @@ ctdb_update_db_stat_hot_keys(struct ctdb_db_context *ctdb_db, TDB_DATA key, int
sort_keys:
for (i = 1; i < MAX_HOT_KEYS; i++) {
+ if (ctdb_db->statistics.hot_keys[i].count == 0) {
+ continue;
+ }
if (ctdb_db->statistics.hot_keys[i].count < ctdb_db->statistics.hot_keys[0].count) {
hopcount = ctdb_db->statistics.hot_keys[i].count;
ctdb_db->statistics.hot_keys[i].count = ctdb_db->statistics.hot_keys[0].count;