Skip to content

[DB-2161]: Add config properties for DuckDB temp files - #5668

Merged
sakno merged 13 commits into
masterfrom
sakno/duckdb-tmp-dir
Jul 30, 2026
Merged

[DB-2161]: Add config properties for DuckDB temp files#5668
sakno merged 13 commits into
masterfrom
sakno/duckdb-tmp-dir

Conversation

@sakno

@sakno sakno commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Changed: Added configuration properties needed to adjust location and size limit of the temp files produced by embedded DuckDB

@sakno sakno self-assigned this Jul 7, 2026
@sakno
sakno requested a review from a team as a code owner July 7, 2026 12:30
@linear-code

linear-code Bot commented Jul 7, 2026

Copy link
Copy Markdown

DB-2161

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

sakno and others added 11 commits July 8, 2026 18:20
because less likely to cause operational problems e.g. if user has their system temp space on a smaller or less performant drive than their data.
call GetFullPath rather than requiring it to be full path, same as we do for db and index path configuration
@timothycoleman
timothycoleman requested a review from a team as a code owner July 30, 2026 12:59
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploying eventstore with  Cloudflare Pages  Cloudflare Pages

Latest commit: d219519
Status: ✅  Deploy successful!
Preview URL: https://2d495504.eventstore.pages.dev
Branch Preview URL: https://sakno-duckdb-tmp-dir.eventstore.pages.dev

View logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds configuration for DuckDB’s temporary file directory and maximum temp disk usage, wires those settings through to the DuckDB connection pool, and documents/validates the new options.

Changes:

  • Introduces SqlEngineTempDirectory and SqlEngineTempDirectorySizeLimit options and passes them into DuckDB connection configuration.
  • Adds startup cleanup of leftover DuckDB *.tmp artifacts in the configured temp directory.
  • Extends configuration validation + adds unit tests and documentation for the new settings.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/KurrentDB.Core/TransactionLog/Chunks/TFChunkDbConfig.cs Adds init-only properties to carry DuckDB temp directory settings into core DB config.
src/KurrentDB.Core/DuckDB/DuckDBConnectionPoolLifetime.cs Applies DuckDB temp settings and attempts startup cleanup of stale temp artifacts.
src/KurrentDB.Core/Configuration/ClusterVNodeOptionsValidator.cs Validates new options (non-negative size limit, path constraints, distinct directories).
src/KurrentDB.Core/Configuration/ClusterVNodeOptions.cs Defines new configuration options and help text.
src/KurrentDB.Core/ClusterVNode.cs Plumbs new options into TFChunkDbConfig creation.
src/KurrentDB.Core.XUnit.Tests/DuckDB/DuckDBConnectionPoolLifetimeTests.cs Adds tests verifying startup cleanup behavior for default and configured temp directories.
src/KurrentDB.Core.XUnit.Tests/Configuration/ClusterVNodeOptionsValidatorTests.cs Adds tests for new validation rules.
docs/server/configuration/db-config.md Documents the new CLI/YAML/env settings and defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/KurrentDB.Core/Configuration/ClusterVNodeOptionsValidator.cs
Comment thread src/KurrentDB.Core/DuckDB/DuckDBConnectionPoolLifetime.cs
@sakno
sakno merged commit 19accff into master Jul 30, 2026
108 checks passed
@sakno
sakno deleted the sakno/duckdb-tmp-dir branch July 30, 2026 13:28
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.

3 participants