Skip to content

Split up sql dialects by consuming store - #5702

Open
rbev wants to merge 2 commits into
masterfrom
rhys/sql-dialect-tidy
Open

Split up sql dialects by consuming store#5702
rbev wants to merge 2 commits into
masterfrom
rhys/sql-dialect-tidy

Conversation

@rbev

@rbev rbev commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This pull request refactors the SQL dialect and ingestion infrastructure for both PostgreSQL and SQL Server providers, separating the logic for failed message ingestion and retry batch persistence into distinct, provider-specific classes. This change clarifies responsibilities, improves maintainability, and enables more granular testing. It also introduces shared base classes for common SQL generation and execution logic.

Functional changes:

  • Improved chunking logic in SQL Server dialects to dynamically calculate maximum rows per statement based on SQL parameter limits. [1] [2] [3]

Refactoring of SQL dialects and ingestion infrastructure:

  • Introduced provider-specific base classes (PostgreSqlDialect, SqlServerDialect) to encapsulate common SQL parameterization and execution logic, reducing code duplication. [1] [2]
  • Split the ingestion SQL dialect interfaces and implementations:
    • Created IFailedMessageIngestionSqlDialect and IRetryBatchSqlDialect interfaces, with separate implementations for PostgreSQL (PostgreSqlFailedMessageIngestionSqlDialect, PostgreSqlRetryBatchSqlDialect) and SQL Server (SqlServerFailedMessageIngestionSqlDialect, SqlServerRetryBatchSqlDialect). [1] [2] [3]
    • Updated dependency registrations to use the new interfaces and classes. [1] [2]
  • Removed duplicate code for parameter row generation and SQL execution from the dialect classes, centralizing it in the new base classes. [1] [2] [3] [4]

Documentation updates:

  • Updated docs/error-ingestion-design.md to reflect the new separation of dialect responsibilities, clarifying which classes are responsible for which persistence operations. [1] [2] [3]

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