Skip to content

feat: drain_poll_ms config, DuckDB 1.5, clean DuckDB teardown#35

Merged
YuweiXiao merged 5 commits intomainfrom
worktree-fix-regressions
Mar 19, 2026
Merged

feat: drain_poll_ms config, DuckDB 1.5, clean DuckDB teardown#35
YuweiXiao merged 5 commits intomainfrom
worktree-fix-regressions

Conversation

@YuweiXiao
Copy link
Copy Markdown
Collaborator

@YuweiXiao YuweiXiao commented Mar 18, 2026

Summary

Flush threads now self-poll for new changes via a configurable drain_poll_ms interval (default 200ms), replacing the WAL-side dirty_tables tracking and notification mechanism. This simplifies the WAL consumer path and decouples drain frequency from flush frequency.

DuckDB connection teardown is cleaned up: FlushWorker and snapshot consumer now explicitly DETACH the DuckLake database before dropping connections. The atexit/_exit workaround for the Linux double-free crash has been removed — the proper fix is a linker-level change in pg_ducklake (relytcloud/pg_ducklake#90).

DuckDB crate bumped from 1.4.3 to 1.10500.0 (DuckDB 1.5).

Changes

  • Add drain_poll_ms config key to duckpipe.config / duckpipe.group_config
  • Remove notify_table() and dirty_tables tracking from WAL consumer
  • DETACH DuckLake in FlushWorker::drop() and snapshot consumer DetachOnDrop
  • Remove Linux atexit+_exit workaround (superseded by fix: hide internal C++ symbols on Linux to prevent double-free at exit pg_ducklake#90)
  • Bump duckdb crate to =1.10500.0
  • Make group_config regression test resilient to new config keys

Test plan

  • cargo fmt --check passes
  • make installcheck — all regression tests pass

🤖 Generated with Claude Code

YuweiXiao and others added 3 commits March 19, 2026 11:44
Add drain_poll_ms to group config (default 200ms) controlling how
frequently flush threads check for new changes. Remove the WAL-side
dirty_tables tracking and notification — flush threads now self-poll
on their own interval, simplifying the architecture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Explicitly DETACH the DuckLake database before dropping DuckDB
connections in FlushWorker and snapshot consumer for clean teardown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@YuweiXiao YuweiXiao force-pushed the worktree-fix-regressions branch from fc8b648 to 9de8989 Compare March 19, 2026 03:45
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@YuweiXiao YuweiXiao changed the title feat: add drain_poll_ms config and remove WAL-side notify feat: drain_poll_ms config, DuckDB 1.5, clean DuckDB teardown Mar 19, 2026
@YuweiXiao YuweiXiao merged commit acf4839 into main Mar 19, 2026
5 of 6 checks passed
@YuweiXiao YuweiXiao deleted the worktree-fix-regressions branch March 19, 2026 08:05
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.

1 participant