diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Log when a cache slot is claimed by a colliding key
Diffstat (limited to 'source')
| -rw-r--r-- | source/cache.c | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 8 insertions, 0 deletions
diff --git a/source/cache.c b/source/cache.c index d6e450a..435cc96 100644 --- a/source/cache.c +++ b/source/cache.c @@ -354,6 +354,14 @@ static int process_slot(struct cache_slot *slot) return err; } + // A slot that opened cleanly but holds another key is a collision, + // and two popular pages sharing one slot evict each other on every + // alternating visit. Nothing else makes that visible, because the + // cache keeps working and only quietly stops helping. + if (!err) + log_error("[cgit] cache slot %s holds a different key, " + "consider a larger cache-size\n", slot->path); + // If any part of creating a slot fails the page is still rendered // straight to the client and the caller is told the request succeeded, // because it did. |
