mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
The use of AllKeys had a hidden cost of scanning _every_ key in redis, not just those associated with outbound requests. So this commit ports the outbound-requests logger to use a FIFOList, the same datastructure used by our slow request logger. This has the additional benefit of reducing our API surface in rcache, since this was the only user of AllKeys and the Multi* functions. We could likely do this better since we do things like lookup all logged requests each time we want to read. But given the value is small (500 items) and it is only done on read (not log time), this seems like a fine tradeoff versus doing a bigger change. Test Plan: go test |
||
|---|---|---|
| .. | ||
| client_test.go | ||
| client.go | ||
| CODENOTIFY | ||
| doc.go | ||
| external.go | ||
| redis_logger_middleware_test.go | ||
| redis_logger_middleware.go | ||
| transport.go | ||