You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Postgres with_advisory_lock converts non-numeric lock names to integers by converting the lock name to a string and then computing the hash of the string. Unfortunately Ruby MRI 1.9 uses a session local random seed in the String hash method so hash codes will be different in different MRI instances. See this Stackoverflow question for more details. It looks like using Zlib.crc32 instead should do the trick.
The text was updated successfully, but these errors were encountered:
jturkel
added a commit
to salsify/with_advisory_lock
that referenced
this issue
Mar 21, 2013
On Postgres with_advisory_lock converts non-numeric lock names to integers by converting the lock name to a string and then computing the hash of the string. Unfortunately Ruby MRI 1.9 uses a session local random seed in the String hash method so hash codes will be different in different MRI instances. See this Stackoverflow question for more details. It looks like using Zlib.crc32 instead should do the trick.
The text was updated successfully, but these errors were encountered: