From bc6d7980a4cefc2c17e51a0cbf78dceea9a4eede Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 25 Jul 2017 10:38:29 -0400 Subject: [PATCH] Revert "Merge pull request #15593 from edx/efischer/edu-274_logging" This reverts commit 2d6b477e83a542b48f76c634f48d10fbe5711452, reversing changes made to 7799c4adf45170841414078c0590de566950716e. --- .../lib/xmodule/xmodule/modulestore/__init__.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index bc22a6fb9e..e3502d494f 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -7,7 +7,6 @@ import logging import re import json import datetime -import traceback from pytz import UTC from collections import defaultdict @@ -158,19 +157,7 @@ class ActiveBulkThread(threading.local): """ def __init__(self, bulk_ops_record_type, **kwargs): super(ActiveBulkThread, self).__init__(**kwargs) - self._records = defaultdict(bulk_ops_record_type) - self.CMS_LEAK_DEBUG_GLOBAL = True # only log once per process - - @property - def records(self): - if self.CMS_LEAK_DEBUG_GLOBAL and len(self._records) > 2000: # arbitrary limit, we peak around ~2750 on edx.org - log.info( - "EDUCATOR-768: The memory leak issue may be in progress. How we got here:\n{}".format( - "".join(traceback.format_stack()) - ) - ) - self.CMS_LEAK_DEBUG_GLOBAL = False - return self._records + self.records = defaultdict(bulk_ops_record_type) class BulkOperationsMixin(object):