1

在使用 Commanded 和 Phoenix 构建的事件源应用程序中,我们consistency_timeout在部署到生产环境 (Heroku) 后的命令处理过程中得到一个。

这是日志输出:

[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 投影的 commanded 事件存储。

版本:

  • 命令 0.17.0
  • commanded_ecto_projections 0.7.1
  • commanded_eventstore_adapter 0.4.0
  • 事件存储 0.14.0
  • 二郎20.3.2
  • 灵丹妙药 1.6.5
  • 凤凰 1.3.4
4

1 回答 1

1

我不熟悉 Heroku 部署,但您是否运行多个节点,如果是,您是如何配置 Commanded 和 Event Store 库的?

通过Commanded 的 Gitter chat调试问题可能更容易。

于 2018-09-17T20:08:08.220 回答