tinkerbell/terraform-provider-tinkerbell

Remove workaround for "pq: could not serialize access due to read/write dependencies among transactions"

Closed this issue · 9 comments

tinkerbell/tink#338 has been resolved, so we should be able to mostly remove it (as deleting workflows seems to be still affected).

@invidian you mean remove the error check for that? or there is more code? asking that because I did not see any TODO in the code related to this

found this only:

serializationError = "could not serialize access due to read/write dependencies among transactions"

@invidian you mean remove the error check for that? or there is more code? asking that because I did not see any TODO in the code related to this

I think we can remove the calls to retryOnTransientError from everywhere except the workflow removal code, as it still requires it.

But before doing that, we need to make sure that sandbox version we use includes tinkerbell/tink#346.

Perhaps we could also wait for tinkerbell/tink#395.

@invidian both are merged, do you think we can move forward?

True, thanks for the heads up. Also sandbox repository got updated by now, for which I created the PR already (#23).

However, I hit this issue: tinkerbell/tink#413 and I'm still wondering if we should update to newer version.

Actually, tinkerbell/tink#338 has been re-opened, as it still occurs when resources are removed.

@invidian - can you point to the location of the workaround in the code base?

still willing to help :)

serializationError = "could not serialize access due to read/write dependencies among transactions"
)
func retryOnTransientError(f func() error) error {
err := f()
if err == nil {
return nil
}
if strings.HasSuffix(err.Error(), serializationError) {
return retryOnTransientError(f)
}
return err
}
is still there.

The Tinkerbell stack has moved to a Kubernetes resource model and deprecated the postgres backend. This repo is scheduled to be archived.