mirror of
https://github.com/samba-team/samba.git
synced 2025-03-29 02:50:28 +03:00
ctdb: Print key as hex string instead of just the hash in hot record message
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
ee3b17ba46
commit
10b36782bf
@ -825,6 +825,7 @@ ctdb_update_db_stat_hot_keys(struct ctdb_db_context *ctdb_db, TDB_DATA key,
|
||||
int count)
|
||||
{
|
||||
int i, id;
|
||||
char *keystr;
|
||||
|
||||
/* smallest value is always at index 0 */
|
||||
if (count <= ctdb_db->statistics.hot_keys[0].count) {
|
||||
@ -860,9 +861,13 @@ ctdb_update_db_stat_hot_keys(struct ctdb_db_context *ctdb_db, TDB_DATA key,
|
||||
ctdb_db->statistics.hot_keys[id].key.dsize = key.dsize;
|
||||
ctdb_db->statistics.hot_keys[id].key.dptr = talloc_memdup(ctdb_db, key.dptr, key.dsize);
|
||||
ctdb_db->statistics.hot_keys[id].count = count;
|
||||
DEBUG(DEBUG_NOTICE,
|
||||
("Updated hot key database=%s key=0x%08x id=%d count=%d\n",
|
||||
ctdb_db->db_name, ctdb_hash(&key), id, count));
|
||||
|
||||
keystr = hex_encode_talloc(ctdb_db,
|
||||
(unsigned char *)key.dptr, key.dsize);
|
||||
DEBUG(DEBUG_NOTICE,("Updated hot key database=%s key=%s id=%d "
|
||||
"count=%d\n", ctdb_db->db_name,
|
||||
keystr ? keystr : "" , id, count));
|
||||
talloc_free(keystr);
|
||||
|
||||
sort_keys:
|
||||
for (i = 1; i < MAX_HOT_KEYS; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user