fix: drop Meta cache during update (#18182)
This commit is contained in:
parent
1c06b331ef
commit
656f6df257
4 changed files with 10 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ DEFAULT_FIELD_LABELS = {
|
|||
|
||||
|
||||
def get_meta(doctype, cached=True) -> "Meta":
|
||||
if not cached:
|
||||
if not cached or frappe.flags.in_patch:
|
||||
return Meta(doctype)
|
||||
|
||||
if meta := frappe.cache().hget("meta", doctype):
|
||||
|
|
|
|||
|
|
@ -211,5 +211,6 @@ frappe.patches.v14_0.set_suspend_email_queue_default
|
|||
frappe.patches.v14_0.different_encryption_key
|
||||
frappe.patches.v14_0.update_multistep_webforms
|
||||
execute:frappe.delete_doc('Page', 'background_jobs', ignore_missing=True, force=True)
|
||||
frappe.patches.v14_0.drop_meta_cache
|
||||
frappe.patches.v14_0.drop_unused_indexes
|
||||
frappe.patches.v15_0.drop_modified_index
|
||||
|
|
|
|||
7
frappe/patches/v14_0/drop_meta_cache.py
Normal file
7
frappe/patches/v14_0/drop_meta_cache.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
cache = frappe.cache()
|
||||
for key in cache.hkeys("meta"):
|
||||
cache.hdel("meta", key)
|
||||
|
|
@ -74,7 +74,7 @@ class TestPerformance(FrappeTestCase):
|
|||
"""Ideally should be ran against gunicorn worker, though I have not seen any difference
|
||||
when using werkzeug's run_simple for synchronous requests."""
|
||||
|
||||
EXPECTED_RPS = 55 # measured on GHA
|
||||
EXPECTED_RPS = 50 # measured on GHA
|
||||
FAILURE_THREASHOLD = 0.1
|
||||
|
||||
req_count = 1000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue