schema_load triggers 2nd schema_load (via locking)
Currently, loading the schema (schema_load) accesses the locking column (locking_column) which defaults the value (reset_locking_column) which invalidates the schema (reload_schema_from_cache) which forces another schema load. Good news: The second schema_load does accesses locking_column, but locking_column is set, so it does not reset_locking_column and it does not trigger an infinite loop. The solution is not invalidate the cache while default locking_column
This commit is contained in:
parent
ef5c46d2ee
commit
dffbba1e2a
@ -150,7 +150,7 @@ def locking_column=(value)
|
||||
|
||||
# The version column used for optimistic locking. Defaults to +lock_version+.
|
||||
def locking_column
|
||||
reset_locking_column unless defined?(@locking_column)
|
||||
@locking_column = DEFAULT_LOCKING_COLUMN unless defined?(@locking_column)
|
||||
@locking_column
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user