From 41b1ed384a29c000fbee5bad9457924d097f5e1a Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Tue, 17 Dec 2024 09:48:01 -0500 Subject: [PATCH] Revert "temp: Add temporary monitoring for large memcache keys (#36034)" This reverts commit fb56042bdc125cff060afb61ca4bb6d4cc066f47. --- common/djangoapps/util/memcache.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common/djangoapps/util/memcache.py b/common/djangoapps/util/memcache.py index 723ca87098d1..2f7e6dc623a0 100644 --- a/common/djangoapps/util/memcache.py +++ b/common/djangoapps/util/memcache.py @@ -9,7 +9,6 @@ from django.conf import settings from django.utils.encoding import smart_str -from edx_django_utils.monitoring.utils import increment def fasthash(string): @@ -49,18 +48,9 @@ def safe_key(key, key_prefix, version): # Attempt to combine the prefix, version, and key combined = ":".join([key_prefix, version, key]) - # Temporary: Add observability to large-key hashing to help us - # understand the safety of a cutover from md4 to blake2b hashing. - # See https://github.com/edx/edx-arch-experiments/issues/872 - increment('memcache.safe_key.called') - # If the total length is too long for memcache, hash it if len(combined) > 250: combined = fasthash(combined) - # Temporary: See - # https://github.com/edx/edx-arch-experiments/issues/872 and - # previous comment. - increment('memcache.safe_key.hash_large') # Return the result return combined