-
Notifications
You must be signed in to change notification settings - Fork 458
Detected unapplied rounds in mem_round #2458
Comments
This is a high-level issue with any software. If you kill a process that's executing a business-level transaction, it ends up in limbo. Only atomic transactions can guarantee integrity in such cases, but atomic transactions are only possible when fully controlled by an outside process, like a pure-database transaction, for example, would provide such atomic integrity. But as it is often either preceded or followed by additional processing, this in turn affects the system's integrity. Business-level transactions are inevitably susceptible to such integrity issues, and there is no easy, or much less automated solution to it. Such situations can be mediated by adding a high-level transaction support into the business logic of the app. So what that means,... internally maintaining and persisting status for every business-level transaction, and then adding logic that can deal with transaction data with the status indicating forceful interruption. But let's not be hasty, this is by far one of the most complex tasks in the software development, and very much error-prone. So, from the practical point of view, it makes sense most often to just deal with such cases individually, i.e. running some checks when the system starts, trying to detect and patch the related data issues. It is ugly, I know, but a proper solution, as explained above, may require a monumental effort. In all, these are the possible solutions to such a problem....
I would say, that if the reported case seems isolated, then option 2 should be the most efficient. But as we often know, random process death can result to just about any conceivable integrity issue. So, it may be a bit of a long assumption. UPDATE In theory, sometimes Two-Phase Transactions can be of help. Note however that |
When restarting the application we're waiting for all the processing to be finished gracefully. Secondly, even if we kill the process when there is an open SQL transaction (atomic block save) the transaction should be reverted and database state not affected. I bet more on some bug/inconsistency in application logic itself. |
Detected unapplied rounds in mem_round - Closes #2458
Expected behavior
Whenever the node is restarted at any stage of
syncing
there shouldn't be anyunapplied rounds
.Actual behavior
When a node is restarted, there are
unapplied rounds
inmem_round
Steps to reproduce
start syncing with the network and then try to restart the node, more often than not you will encounter the error
Detected unapplied rounds in mem_round
Which version(s) does this affect? (Environment, OS, etc...)
1.1.0
The text was updated successfully, but these errors were encountered: