-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc error: code = Unknown desc = COMMIT: pq: could not serialize access due to read/write dependencies among transactions #338
Comments
This commit makes sure that testing configuration generates unique resource names, so multiple outputs can be combined and executed by Terraform in parallel. As a preparation to test mitigations against tinkerbell/tink#338. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit makes sure that testing configuration generates unique resource names, so multiple outputs can be combined and executed by Terraform in parallel. As a preparation to test mitigations against tinkerbell/tink#338. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To mitigate tinkerbell/tink#338, as most likely retrying should be happening on server side, not client size. It seems 'database/sql' used by Tink does not export serialization error constant, so we use string matching to check for errors. Checking is strict and should only match only the actual error we want to retry on. Currently, retrying has no limit, as depending on the number of parallel clients, error still may occur. This may potentially lead to the spinlock if deploying with many clients in parallel talking to single Tink server, however, this is not considered for the time being. No retry limit will also ensure, that single client will be able to apply all operations (basically drain the operations "queue"), no matter how many operations are done in parallel. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
BTW, in some cases, like Lines 17 to 45 in 3427566
|
@kdeng3849 looks like what you're looking at right? |
@parauliya this is mitigation I talked about: tinkerbell/terraform-provider-tinkerbell@d4e4080. |
@mmlb yeah, that's exactly it |
@kdeng3849 what is the status of this? |
It has been fixed with this PR: #346 |
Ah, BTW, this was also occurring for other resources, not only for workflows. I'll test if that's still the case. |
This still occurs when workflows are removed:
Running Tinkerbell 266637a. Can we please re-open? |
Creating/deleting Hardware entries and Templates seems OK. |
@invidian asked me to re-open, so I think it is not a fixed issue yet |
close by #654 |
Expected Behaviour
Tink server should be capable of handling requests in paralell.
Current Behaviour
Currently, when one applies multiple requests to tink server in parallel, server sometimes returns the following error:
Steps to Reproduce (for bugs)
Currently, this is sometimes reproducible when using https://github.com/kinvolk/terraform-provider-tinkerbell and when running
terraform destroy
on large number of Tinkerbell resources.Context
Your Environment
Tested using Tinkerbell sandbox with tinkerbell server from image
quay.io/tinkerbell/tink:sha-adb49da
.The text was updated successfully, but these errors were encountered: