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
Keystore.put calls find_or_create_key_for_update, which in turns use self.lock(true) that issues a FOR UPDATE SQL query. FOR UPDATE is only useful in transactions, but Keystore.put does not use any transactions. Thus, the put operation loses its atomicity.
This only happens when the database being used is neither MySQL or SQLite. But I think it is still an issue worth fixing.
Keystore.put
callsfind_or_create_key_for_update
, which in turns use self.lock(true) that issues aFOR UPDATE
SQL query.FOR UPDATE
is only useful in transactions, butKeystore.put
does not use any transactions. Thus, the put operation loses its atomicity.This only happens when the database being used is neither MySQL or SQLite. But I think it is still an issue worth fixing.
lobsters/app/models/keystore.rb
Lines 16 to 32 in fba26ed
lobsters/app/models/keystore.rb
Lines 62 to 77 in fba26ed
The text was updated successfully, but these errors were encountered: