summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 16:36:02 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 16:36:02 +0000
commited7613771493e61c2e20512cb28c9cd599fbc9f1 (patch)
tree9c99c6d2af280b371428f0f10d61d6b897b1963f /net/http
parent2d9df9a2685bc73200c7ca8f415d1f51b586b537 (diff)
downloadchromium_src-ed7613771493e61c2e20512cb28c9cd599fbc9f1.zip
chromium_src-ed7613771493e61c2e20512cb28c9cd599fbc9f1.tar.gz
chromium_src-ed7613771493e61c2e20512cb28c9cd599fbc9f1.tar.bz2
Track occurance of Open/Create races on http cache transactions.
If two requests for the same uncached resource occur contemporaneously, then both can attempt to create the same entry. The second will fail to create an entry, and as a result we'll downgrade the request to pass through. How often does this happen? With this histogram, we'll know. R=rvargas@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/11711002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_cache_transaction.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 0746692..8edce00 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1019,7 +1019,10 @@ int HttpCache::Transaction::DoCreateEntryComplete(int result) {
return OK;
}
- if (result != OK) {
+ if (result == OK) {
+ UMA_HISTOGRAM_BOOLEAN("HttpCache.OpenToCreateRace", false);
+ } else {
+ UMA_HISTOGRAM_BOOLEAN("HttpCache.OpenToCreateRace", true);
// We have a race here: Maybe we failed to open the entry and decided to
// create one, but by the time we called create, another transaction already
// created the entry. If we want to eliminate this issue, we need an atomic