-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query memcached from dynamo db collector #1602
Conversation
Namespace: "scope", | ||
Name: "memcache_miss", | ||
Help: "Reports that missed both our in-memory cache and our memcache", | ||
}) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Updated. PTAL. I'm going to do some local testing. |
Done some more local testing -- everything works. Note: after scaling replicas, SRV resolution seems to fail until I delete & recreate the k8s memcached-svc |
err := updateMemcacheServers(memcachedHost, memcachedService, &memcacheServers) | ||
if err != nil { | ||
// REVIEWER: Undecided whether this should exit or not. Thoughts? | ||
log.Errorf("Could not set memcache servers: %v", err) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@jml I've left quite a few comments, let me know if you want to discuss. Am going to test now, but will assign back to you for the time being to address these comments. |
@tomwilkie Thanks for the thorough review. I've responded to all of your comments & have followed your suggestions on most. PTAL. |
@@ -59,6 +54,12 @@ var ( | |||
Help: "Size of data read / written from dynamodb.", | |||
}, []string{"method"}) | |||
|
|||
inProcessCacheCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ | |||
Namespace: "scope", | |||
Name: "dynamo_cache", // TODO(jml): Rename this monitoring variable. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
ticker := time.NewTicker(updateInterval) | ||
go func() { | ||
for range ticker.C { | ||
updateMemcacheServers(host, service, &servers) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@tomwilkie All responded. PTAL. |
LGTM once green. |
And a big squash! |
If given settings for memcached, services will store & fetch reports from memcache after checking their in-process cache but before fetching from S3.
timeRequest
to parametrize the error -> status behaviourThis change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)