Closed chenilim closed 2 years ago
@chenilim could not reproduce the error, although your analysis makes sense. There is a potential issue here, as running into this error would cause the plugin to fail on start. If the errored plugin node is restarted everything would work fine, hence the lack of visible consequences of this.
What we could do to mitigate this is to avoid failing if the templates are not inserted, so the second node that tries to insert them simply logs the error and continues with the boot process.
Steps to reproduce the behavior
/cloud create SERVERNAME --size miniHA --database mysql-operator --version master
)Error 1062: Duplicate entry '0-3fa520eb-30cd-4852-829a-ba3bc7e88e26' for key 'PRIMARY'
.Expected behavior
No error
Edition and Platform
Additional context
Note: Despite the error, the Boards plugin appears to be running on both nodes of the cluster, and functions.
The block id in the error is the first block in the InitializeTemplates method. It seems that one node of the (2-node) cluster successfully runs InitializeTemplates, but this might be happening before
isInitializationNeeded
runs on the second one, which then tries toimportInitialTemplates
, and fails because the blocks are already inserted.Perhaps one solution is to wrap
isInitializationNeeded
andimportInitialTemplates
in a single transaction?More lines from the log: