From 0a6010e712f0985ee02332a7bd09af79dda635ac Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 May 2021 22:06:32 +0530 Subject: [PATCH] No need to explicitly get the write lock since clear_composite_caches gets it for us --- src/calibre/db/cache.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/db/cache.py b/src/calibre/db/cache.py index ca3b316b4f..e7aac6c04b 100644 --- a/src/calibre/db/cache.py +++ b/src/calibre/db/cache.py @@ -686,8 +686,7 @@ class Cache(object): composite_cache_needs_to_be_cleared = True if composite_cache_needs_to_be_cleared: try: - with self.write_lock: - self.clear_composite_caches() + self.clear_composite_caches() except LockingError: # We can't clear the composite caches because a read lock is set. # As a consequence the value of a composite column that calls