Skip to content

feat: remove database validation overhead and fix Ctrl+C cancellation in QueryCommand#62

Merged
liphvf merged 4 commits intomainfrom
mcptoolbox
Apr 15, 2026
Merged

feat: remove database validation overhead and fix Ctrl+C cancellation in QueryCommand#62
liphvf merged 4 commits intomainfrom
mcptoolbox

Conversation

@liphvf
Copy link
Copy Markdown
Owner

@liphvf liphvf commented Apr 15, 2026

Summary

  • Remove database access pre-validation in QueryCommand to eliminate unnecessary connection overhead before query execution; discovery now happens once during the parallel execution phase
  • Fix Ctrl+C cancellation not stopping in-flight queries: pass cts.Token to the outer Parallel.ForEachAsync ParallelOptions so the token propagates correctly through both server and database loops down to Npgsql
  • Remove OperationCanceledException from Polly's ShouldHandle predicate — intentional cancellations were being silently retried up to 3 times (causing ~3.5s delay after Ctrl+C); only NpgsqlException and TimeoutException are now retried
  • Await writer task with WaitAsync(cts.Token) to prevent the process from hanging indefinitely after cancellation
  • Remove legacy publish.bat (replaced by publish.ps1)
  • Revert unintended change to winget-publish.ps1

Test coverage

  • 154 tests passing, 0 failures
  • No new tests added; changes are behavioral fixes to control flow and token propagation

liphvf added 4 commits April 13, 2026 22:35
operations

- Pass CancellationToken to ParallelOptions in QueryCommand
- Remove OperationCanceledException from Polly retry conditions
- Await writer task with cancellation to prevent hanging after cancel
- Update specs and design docs for new cancellation behavior
@liphvf liphvf merged commit 77adb2b into main Apr 15, 2026
1 check passed
@liphvf liphvf deleted the mcptoolbox branch April 15, 2026 00:35
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