[
https://issues.apache.org/jira/browse/FLINK-16497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120969#comment-17120969
]
Benchao Li commented on FLINK-16497:
------------------------------------
Hi [~sunjincheng121] , thanks for your detailed explanation, and it's really
insightful.
Let me try to express my opinion a little deeper. From my perspective, we
always have those two settings when we encounters 'flush', and 'max-rows'
controls the upper bound of each batch while 'flush-timeout' controls the lower
bound of each batch. From this point, I think the case we are facing now
belongs to the latter one.
About the 1s latency for the testing case, I think maybe it's ok because Jdbc
Sink is not the only one who brings latency to the user facing latency, the
message queue (like Kafka), the network, and Flink Runtime all bring some
latency. At least in my perspective, it's ok to have one more second in the
sink to allow user to see the data in DB.
And another point I want to address is, if we set the default 'max-rows' to 1,
maybe it will force most of production scenarios to override this config, which
maybe not that friendly to existing production use cases.
> Improve default flush strategy for JDBC sink to make it work out-of-box
> -----------------------------------------------------------------------
>
> Key: FLINK-16497
> URL: https://issues.apache.org/jira/browse/FLINK-16497
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / JDBC, Table SQL / Ecosystem
> Reporter: Jark Wu
> Priority: Major
> Fix For: 1.11.0
>
>
> Currently, JDBC sink provides 2 flush options:
> {code}
> 'connector.write.flush.max-rows' = '5000', -- default is 5000
> 'connector.write.flush.interval' = '2s', -- no default value
> {code}
> That means if flush interval is not set, the buffered output rows may not be
> flushed to database for a long time. That is a surprising behavior because no
> results are outputed by default.
> So I propose to have a default flush '1s' interval for JDBC sink or default 1
> row for flush size.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)