When hived is heavily loaded with work, it can sometimes:
- ignore some transactions and never add them to blocks,
- fail to access database to perform requested operation and respond with "Unable to acquire database lock" error.
I discovered these problems in two situations. First case is on CI, when I run multiple pipelines at the same time. Second case is on my local computer, when I run tests with multiple (200k) accounts creation.
Proposed workarounds will retry to send request forever if above errors occur. Because finally transaction will be appended to block (1) and finally node will acquire database lock (2). These workarounds could be reverted when problem will be mitigated in hived.
I rewrite one test (which is kind of performance test), which creates multiple (200k) accounts to always cause one of above error. Here I run it multiple times to make sure it always fails (pipeline #42855,
Then I apply workarounds and it helped, but one of five pipelines froze probably because of hive#263 (closed). I applied fixes from hive@252cf962 (this commit is already merged with
origin/develop) and all problems have disappeared. All run pipelines passed