DanielLeens commented on code in PR #13589:
URL: https://github.com/apache/seatunnel/pull/13589#discussion_r4731671445
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/converter/AbstractJdbcRowConverter.java:
##########
@@ -202,28 +212,27 @@ public PreparedStatement toExternal(
SeaTunnelRow row,
PreparedStatement statement)
throws SQLException {
- SeaTunnelRowType rowType = tableSchema.toPhysicalRowDataType();
+ WriteMetadata metadata = writeMetadata;
+ if (metadata == null
Review Comment:
Yes, that is a useful optional optimization to consider. I traced the JDBC
executor: exist():166-168 binds keyTableSchema, then addToBatch():82-97 binds
valueTableSchema on the same rowConverter.
AbstractJdbcRowConverter.toExternal:215-220 stores only one identity-keyed
WriteMetadata entry. When the key and value schemas are distinct objects,
alternating those calls replaces the entry each time; that path gets no
steady-state write-cache hit.
A bounded second entry, or a separately owned key-binding converter, could
cover that access pattern. I would prefer the bounded two-entry approach if it
preserves the current converter ownership and schema-identity invalidation
contract; creating a second converter needs checking any dialect-specific
mutable state. Keep the cache bounded and add an alternating-key/value-schema
regression before making a performance claim. This is a non-blocking
improvement opportunity, not evidence of incorrect bound values or a measured
regression. The CI fact in my previous follow-up has since changed: the
exact-head [fork
Build](https://github.com/zhangshenghang/seatunnel/actions/runs/46131928502) is
now queued with no completed conclusion. The earlier wrapper failure is
historical attempt evidence; please let the existing attempt finish instead of
stacking another rerun or adding unrelated dependency patches. Current-head CI
and independent maintainer approval remain required. Thanks for poin
ting out the concrete caller.
--
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]