DanielCarter-stack commented on issue #10481:
URL: https://github.com/apache/seatunnel/issues/10481#issuecomment-3882015830

   <!-- code-pr-reviewer -->
   Thanks for the detailed report. This is confirmed as a design limitation.
   
   **Root Cause:**
   When `exactly_once` is enabled, the SQL Server CDC connector sets the 
snapshot queue size to `Integer.MAX_VALUE` to buffer all snapshot data in 
memory, causing OOM for large tables.
   
   **Evidence:**
   - 
`connector/cdc/sqlserver-cdc/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/sqlserver/source/reader/fetch/SqlServerSourceFetchTaskContext.java:121-124`
   - `docs/en/connectors/source/SqlServer-CDC.md:20`
   
   **Workarounds:**
   
   1. **Disable exactly-once** (immediate fix)
      ```hocon
      SqlServer-CDC {
        exactly_once = false  # uses configured queue size
      }
      ```
   
   2. **Use incremental mode** to skip initial snapshot
      ```hocon
      startup.mode = "latest"
      ```
   
   3. **Reduce snapshot fetch size**
      ```hocon
      snapshot.fetch.size = 512
      snapshot.split.size = 4096
      ```
   
   4. **Split the 600+ tables into multiple jobs**
   
   Could you share your current `exactly_once` configuration, JVM heap size per 
worker, and whether at-least-once semantics would be acceptable?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to