Skip to content

feat(export): add target-presence segment with existing.zip and missing.zip#143

Merged
devlead merged 1 commit into
WCOMAB:mainfrom
devlead:feature/missingExistingPK
May 20, 2026
Merged

feat(export): add target-presence segment with existing.zip and missing.zip#143
devlead merged 1 commit into
WCOMAB:mainfrom
devlead:feature/missingExistingPK

Conversation

@devlead

@devlead devlead commented May 20, 2026

Copy link
Copy Markdown
Member

Extend schema-tracking export with a fourth parallel segment that classifies every tracked change (I/U/D + primary key) against the sync target database. Jobs now produce response/existing.zip and response/missing.zip alongside the existing updated/inserted/deleted segment ZIPs. result.json and job status APIs expose existingZipSasUri and missingZipSasUri (nullable for older results).

  • Add TargetPresence export segment, queue constants, and ProcessExportJobQueues handlers (process, done, error) wired like the three source-based segments
  • Track TargetPresenceDone on export job table entities and list/status models
  • Dispatch target-presence work from the main export job fan-out
  • Finalize jobs only when all four segments complete; require both new ZIP blobs before writing result.json with SAS URIs
  • Add GetChangeTrackingExportChangeOperationAndPrimaryKeysSelectStatement for CHANGETABLE rows with changeOperation and pk_c0..pk_cN aliases
  • Implement ProcessTargetPresenceSegmentAsync: stream changes from source, batch (200) PKs into #ExportPkBatch on target via SqlBulkCopy, run paired INNER JOIN / LEFT OUTER JOIN queries for existing vs missing rows, stream compact camelCase JSON into paired ZIP archives
  • Add SchemaTrackingExportTargetPresenceZipWriter for existing.json / missing.json array entries inside each ZIP
  • Document target-presence outputs and SAS fields in README

…ng.zip

Extend schema-tracking export with a fourth parallel segment that classifies
every tracked change (I/U/D + primary key) against the sync target database.
Jobs now produce response/existing.zip and response/missing.zip alongside the
existing updated/inserted/deleted segment ZIPs. result.json and job status APIs
expose existingZipSasUri and missingZipSasUri (nullable for older results).

- Add TargetPresence export segment, queue constants, and ProcessExportJobQueues
  handlers (process, done, error) wired like the three source-based segments
- Track TargetPresenceDone on export job table entities and list/status models
- Dispatch target-presence work from the main export job fan-out
- Finalize jobs only when all four segments complete; require both new ZIP blobs
  before writing result.json with SAS URIs
- Add GetChangeTrackingExportChangeOperationAndPrimaryKeysSelectStatement for
  CHANGETABLE rows with changeOperation and pk_c0..pk_cN aliases
- Implement ProcessTargetPresenceSegmentAsync: stream changes from source,
  batch (200) PKs into #ExportPkBatch on target via SqlBulkCopy, run paired
  INNER JOIN / LEFT OUTER JOIN queries for existing vs missing rows, stream
  compact camelCase JSON into paired ZIP archives
- Add SchemaTrackingExportTargetPresenceZipWriter for existing.json / missing.json
  array entries inside each ZIP
- Document target-presence outputs and SAS fields in README
@devlead devlead merged commit 2389d66 into WCOMAB:main May 20, 2026
2 checks passed
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