## What
While the engine is shutting down we don't accept any incoming event as:
a. It's incorrect since we already decided to close the engine (i.e
target reached)
b. It's unsafe for socket write as the engine forcefully kills it event
thread, which may cause our socket to disconnect if in the middle to
write
## How
Added a flag to signal engine shutting down and prevent accepting any
incoming event.
## Review guide
<!--
1. `x.py`
2. `y.py`
-->
## User Impact
<!--
* What is the end result perceived by the user?
* If there are negative side effects, please list them.
-->
## Can this PR be safely reverted and rolled back?
<!--
* If unsure, leave it blank.
-->
- [ ] YES 💚
- [ ] NO ❌
## What
Refactors the database operation interfaces and establishes the first
component test suite
## How
### Interface Separation
- Consolidated `AirbyteClient` and `DirectLoadTableSqlOperations` into
`TableOperationsClient`
- Standard SQL operations (CREATE, DROP, COPY, UPSERT) and their
compositions
- Adds straightforward methods for test with default impls to avoid
breaking connectors
- Renamed DirectLoadTableNativeOperations → TableSchemaEvolutionClient
- Better reflects its responsibility for complex schema evolution
operations
- Distinguishes it from simple SQL operations handled by
TableOperationsClient
### Test Suite Infrastructure
- TableOperationsSuite: Interface-based test suite for validating all
table operations
- TableOperationsTestHarness: Helper class for test execution
- TableOperationsFixtures: Centralized test data and constants
### Documentation Improvements
- Added comprehensive JavaDoc explaining the complexity domains each
interface handles
- Documented specific challenges implementors must address (type
translation, nullable columns, PK changes, etc.)
- Clear cross-references between related interfaces
### Other
- Moves some interfaces / objects from the `db` toolkit to the main
`load` cdk for simpler dependency handling
### Migration Guide
For connector implementations:
1. TableOperationsClient replaces AirbyteClient and
DirectLoadTableSqlOperations
2. Replace DirectLoadTableNativeOperations with
TableSchemaEvolutionClient
3. Ensure getGenerationId() calls use TableOperationsClient instance
4. Update imports
## What
Better handle interleaved streams
Refactor `MemoryAndParallelismConfig` to `AggregatePublishingConfig` for
clarity
## How
* We now specify the total allowed memory (`maxEstBytesAllAggregates`)
and evict the largest if total usage is above that
* We continue to check cardinality first out of performance concerns
## Note
Is is a "breaking change" because it renames some stuff
## What
As title. Need this for mssql data type
## How
<!--
* Describe how code changes achieve the solution.
-->
## Review guide
<!--
1. `x.py`
2. `y.py`
-->
## User Impact
<!--
* What is the end result perceived by the user?
* If there are negative side effects, please list them.
-->
## Can this PR be safely reverted and rolled back?
<!--
* If unsure, leave it blank.
-->
- [ ] YES 💚
- [ ] NO ❌
## What
When connector configured `"airbyte.first.record.wait.seconds"`
property, we use it for heart beat timeout so we can timeout if no cdc
activity
## How
<!--
* Describe how code changes achieve the solution.
-->
## Review guide
<!--
1. `x.py`
2. `y.py`
-->
## User Impact
<!--
* What is the end result perceived by the user?
* If there are negative side effects, please list them.
-->
## Can this PR be safely reverted and rolled back?
<!--
* If unsure, leave it blank.
-->
- [ ] YES 💚
- [ ] NO ❌