Skip to content
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

DuckDB with backup on GCS #6006

Merged
merged 85 commits into from
Dec 13, 2024
Merged

DuckDB with backup on GCS #6006

merged 85 commits into from
Dec 13, 2024

Conversation

k-anshul
Copy link
Member

@k-anshul k-anshul commented Oct 30, 2024

closes https://github.com/rilldata/rill-private-issues/issues/692

Some of the previous logic removed from existing driver logic.

  1. Clearing .tmp and .wal files if they are bigger than a certain size. Even on main it no longer works because the tmp and wal actually gets built in the attached DBs and not main.
  2. String to enum conversion feature. Not being used anywhere and not documented as well. Can be added in the rduckdb if use case comes again.
  3. tx support in duckdb driver. We no longer need to block read queries while attaching detaching.

@k-anshul k-anshul self-assigned this Oct 30, 2024
@k-anshul k-anshul marked this pull request as ready for review November 5, 2024 05:18
cli/cmd/runtime/start.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/config.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/config.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/config.go Outdated Show resolved Hide resolved
runtime/controller_test.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/config.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/duckdb.go Show resolved Hide resolved
runtime/drivers/duckdb/duckdb.go Outdated Show resolved Hide resolved
runtime/pkg/rduckdb/db.go Outdated Show resolved Hide resolved
bootQueries = append(bootQueries,
"SET preserve_insertion_order TO false",
fmt.Sprintf("SET temp_directory = %s", safeSQLString(tempDir)),
fmt.Sprintf("SET secret_directory = %s", safeSQLString(filepath.Join(dataDir, ".duckdb", "secrets"))),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this interfere with external table storage or will it just be ignored?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. These queries are executed for every db file so setting secret_directory is what is expected.
But there could be issues if all database share same tmp directory. May be for new removing temp_directory seems to be a safe option.
More important was to set unique secret_directory for each instance's database.

@k-anshul k-anshul merged commit d5bf1f5 into main Dec 13, 2024
9 checks passed
@k-anshul k-anshul deleted the duckdb_gcs branch December 13, 2024 14:24
k-anshul added a commit that referenced this pull request Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants