[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.14-35-g463a3146b
Jim Brandt
jbrandt at bestpractical.com
Mon Mar 19 16:37:35 EDT 2018
The branch, 4.2-trunk has been updated
via 463a3146beddae1e32a6479bc47e3ddd477d9fc7 (commit)
via 4b5d34e86a2b7e7b9a358bd175d980766af68dde (commit)
from 6dee85f9ea1aae86495a8bbc51e93bd3ad075df1 (commit)
Summary of changes:
lib/RT/ObjectCustomFieldValues.pm | 8 ++++++++
1 file changed, 8 insertions(+)
- Log -----------------------------------------------------------------
commit 4b5d34e86a2b7e7b9a358bd175d980766af68dde
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Mar 16 03:36:02 2018 +0800
Run ClearOCFVCache on exit.
Entries in OCFVCache contain RT::CustomField objects, which have related
RT::Ticket objects as ContextObject. To safely run
RT::Ticket::ApplyTransactionBatch before global destruction, we need to
remove RT::Ticket objects from global cache variable.
diff --git a/lib/RT/ObjectCustomFieldValues.pm b/lib/RT/ObjectCustomFieldValues.pm
index ac3df168f..b31357b0e 100644
--- a/lib/RT/ObjectCustomFieldValues.pm
+++ b/lib/RT/ObjectCustomFieldValues.pm
@@ -233,4 +233,12 @@ sub _DoCount {
RT::Base->_ImportOverlays();
+# Clear the OCVF cache on exit to release connected RT::Ticket objects.
+#
+# Without this, there could be warnings generated like "Too late to safely run
+# transaction-batch scrips...". You can test this by commenting it out and running
+# some cf tests, e.g. perl -Ilib t/customfields/enter_one.t
+END { ClearOCFVCache(); }
+
+
1;
commit 463a3146beddae1e32a6479bc47e3ddd477d9fc7
Merge: 6dee85f9e 4b5d34e86
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Mon Mar 19 16:13:12 2018 -0400
Merge branch '4.2/clear-ocfv-cache-on-exit' into 4.2-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list