知识卡片
跨流乱序误收透支费
账户把存款、取款放在不同流,消费者若按轮询而非业务时间处理,可能依次看到10元入账、25元支出、20元入账。虽然更早的20元存款本应先于支出处理,系统却在中间判断余额负数并收透支费。根因是跨流没有共同消费顺序,分区各自有序并不能保证账户事实的全局时间关系。此卡只记录问题,不把错序临时余额当作真实透支。
关联:[[跨流时间调度与迟到补正]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Deterministic Stream Processing · 查看原书依据
A bank must ensure that both deposit and withdrawal event streams are processed in the correct temporal order. It keeps a stateful running tally of withdrawals and deposits, applying an overdraft penalty when a client’s account balance drops below $0. For this example, the bank has its deposits in one event stream and its withdrawals in another stream, as shown in Figure 6-2.
参考来源
- 位置:《Building Event-Driven Microservices Leveraging Organizational Data at Scale (Adam Bellemare)》第06章《Deterministic Stream Processing》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Event-Driven Microservices Leveraging Organizational Data at Scale (Adam Bellemare)/_epub-src/OEBPS/ch06.xhtml;规范化段落起句:A bank must ensure that both deposit)
- 结论依据:原文对该对象的定义、运行说明或对比支持以下归纳:账户把存款、取款放在不同流,消费者若按轮询而非业务时间处理,可能依次看到10元入账、25元支出、20元入账。本卡同时保留其适用条件与失败边界。
- 原始内容:A bank must ensure that both deposit and withdrawal event streams are processed in the correct temporal order. It keeps a stateful running tally of withdrawals and deposits, applying an overdraft penalty when a client’s account balance drops below $0. For this example, the bank has its deposits in one event stream and its withdrawals in another stream, as shown in Figure 6-2.