在使用Commanded和Phoenix构建的事件源应用程序中,我们在部署到生产环境(Heroku)之后的命令处理期间获得了consistency_timeout
。
这是日志输出:
[debug] Processing with Web.CountryController.select_country_for_mission/2
[info] Invoicing.Commands.SelectCountryForMission dispatch start
[debug] Locating aggregate process for `Invoicing.Mission` with UUID "mission-23"
[debug] Invoicing.Mission<mission-23@4> executing command: %Invoicing.Commands.SelectCountryForMission{mission_id: "23", country_id: "42"}
[debug] Appended 1 event(s) to stream "mission-23"
[info] Invoicing.Commands.SelectCountryForMission succeeded in 180ms
[warn] Consistency timeout waiting for aggregate "mission-23" at version 5
如果我提交表单两次,则会成功处理其中一个命令 - 但仍未更新读取模型。几分钟后问题在生产中消失了。在我的机器上,问题似乎并没有消失。
该应用程序使用Ecto投影命令的事件存储。
版本:
我不熟悉Heroku部署但是你运行多个节点,如果是这样,你如何配置Commanded和Event Store库?
通过Commanded's Gitter chat调试问题可能更容易。