提交 dffbba1e 编写于 作者: K Keenan Brock

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
上级 ef5c46d2
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册