Skip to content

Add warning log to EvictionQueue::Purge for slow purge detection#46

Open
krleonid wants to merge 1 commit into
mainfrom
duckdb_log_main
Open

Add warning log to EvictionQueue::Purge for slow purge detection#46
krleonid wants to merge 1 commit into
mainfrom
duckdb_log_main

Conversation

@krleonid
Copy link
Copy Markdown
Owner

Summary

  • Add DUCKDB_LOG_WARNING to EvictionQueue::Purge() when iterations > 10 or elapsed time > 1 second
  • Logs queue_size and dead_nodes count for diagnosis
  • Also prints to stderr in DEBUG builds via Printer::PrintF

Usage

SET GLOBAL enable_logging = true;
SET GLOBAL logging_level = 'warning';
-- run workload, then:
SELECT * FROM duckdb_logs() WHERE message LIKE '%Purge%';

Test plan

  • Run concurrent workload with multiple attached databases
  • Verify warning appears in duckdb_logs() when purge takes many iterations
  • Verify no output when purge is fast (< 10 iterations, < 1s)

🤖 Generated with Claude Code

…ed > 1s

Logs via DUCKDB_LOG_WARNING with queue_size and dead_nodes count.
Also prints to stderr in DEBUG builds for local debugging.

Requires: SET GLOBAL enable_logging = true; SET GLOBAL logging_level = 'warning';

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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