database - MySQL multiple processes writing -
i trying build database used store results on tests. problem these tests run in parallel , separate processes , after each 1 of them finishes commit results database. know mysql designed handle such situations , engines innodb can achieve row level locking.
- if process access locked table or entry, process blocked , poll until table or entry unlocked or query cached , process can terminate ?
- when process try connect server when down, happen or me handle ?
any highly appreciated.
the number 2 you, when mysql_connect()
or whatever use connect database throw exception. number 1 issue resolved @ mysql level, depending on process require locked table or row. results in temporary delay query access data in locked areas, can return out-of-time error, should other process lock table/row extended period of time. mutual lock possible, process locks row 1, , process b locks row 2, , wants data row 2 , b wants data row 1. named "deadlocking", , 1 of processes chosen deadlock victim , query returns failure.
Comments
Post a Comment