urbanairship / datacube

Multidimensional data storage with rollups for numerical data
http://urbanairship.com
Apache License 2.0
265 stars 60 forks source link

Add a histogram for CAS attempts when using read-combine-cas #55

Closed hkolbeck closed 9 years ago

todd534 commented 9 years ago

This won't get updated if there's an error, or if we try 'numTries' times without succeeding.

todd534 commented 9 years ago

(The error one doesn't really bother me, but the other one seems like it will bias the histogram? But I guess if you think it mostly succeeds and just want to know how hard it's working when it succeeds, this is cool.)

hkolbeck commented 9 years ago

The semantics I had in mind were "Succeeded on the nth attempt", so updating on a failure feels a bit weird, but I can see the argument for doing so.

todd534 commented 9 years ago

Yeah, I just don't know if there could be like a bimodal situation where either it tries N times and fails or tries once and succeed, and we can't detect that? Perhaps it's a silly worry.

todd534 commented 9 years ago

:+1:

gmcquillan commented 9 years ago

@ckolbeck if you're concerned about a succeeded after so many cas retries, then we need to have another metric that indicates how many raw requests we get, too. It probably already exists. I just wanted to make sure that this has all the pre-reqs it needs.

Otherwise, I do like todd's idea.

gmcquillan commented 9 years ago

:rocket:

hkolbeck commented 9 years ago

@todd534 @gmcquillan I think the cleanest way to address the concerns here is to add a second metric tracking CAS exhaustion. See commit above.

gmcquillan commented 9 years ago

SGTM. +1