DanielLeens commented on PR #12731:
URL: https://github.com/apache/seatunnel/pull/12731#issuecomment-6143430859
Thanks for the careful reply, @yzeng1618, and you are right; I am
withdrawing my Issue 1.
I re-traced the call path on `b200e54600`:
```text
AbstractJdbcSourceChunkSplitter.generateSplits() -> try (JdbcConnection
jdbc = dialect.openJdbcConnection(...))
[AbstractJdbcSourceChunkSplitter.java:75]
-> PostgresChunkSplitter.splitTableIntoChunks ->
PostgresUtils.skipReadAndSortSampleData(...) (auto-commit flipped and
restored, PostgresUtils.java:181-182, 220)
PostgresSnapshotSplitReadTask (reader side, its own connection)
-> PostgresUtils.readTableSplitDataStatement(...) -> initStatement(...)
[PostgresUtils.java:351, 442-445]
```
`initStatement` (the only place that leaves auto-commit `false` without
restoring it) is reached from the snapshot reader on its own connection, not on
the dedicated splitter connection that the sampling query uses. So
`previousAutoCommit` is `true` on the sampling path, restoring it commits
implicitly, and the connection is closed by try-with-resources right after
`generateSplits()`. Adding `commit()` or `rollback()` inside a utility that
does not own the transaction would also be a worse contract than what you have
now.
Conclusion: no change is needed for this point and my review has no
remaining code-side blocker on `b200e54600`. The remaining gate is a maintainer
approval; nothing else is required from you. Thanks again for the quick and
precise fix!
--
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]