From 1985a6af52c152d2b9829b04fe3d42ac1e0224cd Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 18 Aug 2017 16:01:49 +0200 Subject: [PATCH] Fixed bug: Cache invalidation race condition in concurrent threads cause access to newly added ObjectManager attributes to fail. --- app/models/object_manager/attribute.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/object_manager/attribute.rb b/app/models/object_manager/attribute.rb index abf53ae95..3985f9f7e 100644 --- a/app/models/object_manager/attribute.rb +++ b/app/models/object_manager/attribute.rb @@ -720,6 +720,9 @@ to send no browser reload event, pass false def self.reset_database_info(model) model.connection.schema_cache.clear! model.reset_column_information + # rebuild columns cache to reduce the risk of + # race conditions in re-setting it with outdated data + model.columns end def check_name