---
bin/varnishd/cache/cache_ban.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index a96bc9c..64474a7 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -611,10 +611,13 @@ ban_info(enum baninfo event, const uint8_t *ban, unsigned
len)
/* One or more stevedores reported failure. Export the
* list instead. The exported list should take up less
* space due to drops being purged and gones being
- * truncated. */
- /* XXX: Keep some measure of how much space can be
- * saved, and only export if it's worth it. Assert if
- * not */
+ * truncated. We assert that the overhead constitues
+ * at least 10% of the persisted size so that we don't
+ * try to continously reexport on tight space. If the
+ * assertion fails, the persistent stevedores have too
+ * little space for their ban lists */
+ assert(VSC_C_main->bans_bytes_overhead >
+ VSC_C_main->bans_bytes_persisted / 10);
ban_export();
}
}
--
1.7.10.4
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev