Improve serial order consumption batch cadence - #165
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
单热点秒杀在200请求/秒持续输入时,准入全部成功,但旧版成单产出约160单/秒并持续积压。将接收批量从16改为32、批后等待从50ms改为10ms,减少串行消费链路中的批次和等待开销;保留单线程、逐笔事务后ACK、失败不ACK及原超时恢复语义。
同机拓扑、Commerce限4CPU、200请求/秒持续5分钟的前后对照中,两版均正确成单60001笔,全窗预约至成单p99由91.12秒降至5.34秒,采样最大积压由12294降至730,调整后中后段产出跟随输入。组合效果不拆分归因,也不宣称新的容量上限。末尾资源观察器出现docker stats EOF,后置SQL与MQ核对确认最终结果,但没有可与旧版直接比较的精确排空区间。
同时归档已完成的普通下单支付基线、160/200成单记录和售罄诊断。售罄选用6000请求/秒、30秒、p99 4.92ms的独立工作点;不将它称为最大吞吐,停止峰值探索。
验证:
make java-ci python-ci web-ci repo-ci、make test-catalog-integration全部通过,包含真实MySQL/RocketMQ的秒杀、重复消息、付款、退款和权限套件;独立只读代码及结果评审无阻断项。完整环境、SHA、业务SQL和观察限制见bench/results/seckill_order_consumer_comparison_20260908.md,交付索引见bench/results/transaction_results_20260908.md。