}
#ifdef DEBUG
counter_kr_consistent += info.valid;
- printf("GC %sconsistent, KR %sconsistent, size %zu, key len %zu: ",
- entry_type ? "" : "in", entry ? "" : "IN", (key.len + val.len), key.len);
- debug_printbin(key.data, key.len);
- printf("\n");
+ if (!entry_type || !entry) { // don't log fully consistent entries
+ printf("GC %sconsistent, KR %sconsistent, size %zu, key len %zu: ",
+ entry_type ? "" : "in", entry ? "" : "IN",
+ (key.len + val.len), key.len);
+ debug_printbin(key.data, key.len);
+ printf("\n");
+ }
#endif
ret = callback(&key, &info, ctx);
ssize_t amount_tofree = knot_db_lmdb_get_mapsize(db) * cfg->cache_to_be_freed / 100;
- // debug
- /*printf("tofree: %zd\n", amount_tofree);
+#ifdef DEBUG
+ printf("tofree: %zd\n", amount_tofree);
for (int i = 0; i < CATEGORIES; i++) {
if (cats.categories_sizes[i] > 0) {
printf("category %d size %zu\n", i, cats.categories_sizes[i]);
}
- }*/
+ }
+#endif
category_t limit_category = CATEGORIES;
while (limit_category > 0 && amount_tofree > 0) {