1. 首先你描述的场景,不只存在于 Async IO operator,其他 operator 也会有类似问题 2. Flink 的 exactly once 是针对 Flink 内部而言,例如 state 等,[1] 3. 如果你想针对外部系统也保证 exactly once 语义,需要对应的 connector 支持 [2]
1. https://ci.apache.org/projects/flink/flink-docs-release-1.9/internals/stream_checkpointing.html 2. https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/guarantees.html Thanks, Biao /'bɪ.aʊ/ On Wed, 4 Sep 2019 at 12:58, star <[email protected]> wrote: > 感谢您的回复,异步io只能针对失败的异步请求 重发,而不能保证每个请求只发一次,那应该是at least once?附文档:The > asynchronous I/O operator offers full exactly-once fault tolerance > guarantees. It stores the records for in-flight asynchronous requests in > checkpoints and restores/re-triggers the requests when recovering from a > failure. > > 发自我的iPhone > > > ------------------ 原始邮件 ------------------ > 发件人: Dino Zhang <[email protected]> > 发送时间: 2019年9月4日 09:20 > 收件人: user-zh <[email protected]> > 主题: 回复:关于Async I/O的exactly-once > > > > hi star, > > exactly-once指flink内部的,要保证end-to-end > exactly可以通过两阶段提交,需要实现TwoPhaseCommitSinkFunction,或者做幂等处理 > > On Wed, Sep 4, 2019 at 8:20 AM star <[email protected]> wrote: > > > > 看文档我的理解是会将异步的请求保存在检查点中,failover的时候重新触发请求。我的问题是既然是重新触发请求,并没有回滚,那之前的请求已经对外部系统造成影响了,不就是at > > least-once了吗? > > 比如ck1:发送了a b c三个请求更新外部数据库,ck2:发送:d,e,f。假设ck1做完了checkpoint,a > ,b请求成功,c没成功. > > > > > > > ck2在执行到e的时候任务被cancel了,但c,d都已经成功了。那么我重新启动的时候从最近一次成功的ck1拉起,c,d岂不是又要被重新请求一次 > > > > > > 谢谢 > > > > 发自我的iPhone > > > > -- > Regards, > DinoZhang
