-
Notifications
You must be signed in to change notification settings - Fork 504
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
fix(race): Fix race in DuckDB delete-stale #11215
Conversation
7dc210d
to
7c3c8b6
Compare
Co-authored-by: Kemal <223029+disq@users.noreply.github.com>
// per https://duckdb.org/docs/sql/indexes#over-eager-unique-constraint-checking we might need to retry | ||
return backoff.Retry( | ||
func() error { | ||
return c.exec(ctx, "insert into "+table.Name+" from "+tmpTableName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any way we can detect the unique constraint violation error and only retry that, rather than retrying all errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could detect it only via comparing error strings, but I'd rather leave it to the further implementation if we ever need to touch this place once again.
I hope that the issue is fixed by DuckDB itself thus making this code obsolete and enabling us to remove this backoff sooner though.
🤖 I have created a release *beep* *boop* --- ## [4.0.0](plugins-destination-duckdb-v3.0.0...plugins-destination-duckdb-v4.0.0) (2023-06-06) ### ⚠ BREAKING CHANGES * **types:** Support writing Apache Arrow nested types: * Structs as DuckDB structs * Maps as DuckDB maps ### Features * **types:** Proper support for nested types ([#11196](#11196)) ([7c6a3e2](7c6a3e2)) ### Bug Fixes * **deps:** Update `github.com/cloudquery/plugin-sdk/v3` to `v3.10.0` ([#11116](#11116)) ([bba7c4e](bba7c4e)) * **deps:** Update github.com/apache/arrow/go/v13 digest to e07e22c ([#11151](#11151)) ([5083cf7](5083cf7)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 88d5dc2 ([#11226](#11226)) ([9f306bc](9f306bc)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to a7aad4c ([#11184](#11184)) ([8a0822e](8a0822e)) * **deps:** Update github.com/cloudquery/arrow/go/v13 digest to c67fb39 ([#11169](#11169)) ([dcb0f92](dcb0f92)) * **deps:** Update golang.org/x/exp digest to 2e198f4 ([#11155](#11155)) ([c46c62b](c46c62b)) * **deps:** Update google.golang.org/genproto digest to e85fd2c ([#11156](#11156)) ([dbe7e92](dbe7e92)) * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.0.9 ([#11240](#11240)) ([f92cd4b](f92cd4b)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v3 to v3.10.3 ([#11150](#11150)) ([dc00994](dc00994)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v3 to v3.10.4 ([#11244](#11244)) ([8fceef6](8fceef6)) * **race:** Fix issue caused by [Over-Eager Unique Constraint Checking](https://duckdb.org/docs/sql/indexes#over-eager-unique-constraint-checking) in DuckDB overwrite ([#11215](#11215)) ([c0b9f0a](c0b9f0a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
BEGIN_COMMIT_OVERRIDE
fix(race): Fix issue caused by Over-Eager Unique Constraint Checking in DuckDB overwrite (#11215)
END_COMMIT_OVERRIDE