Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataUpdater should serialize all MessageTracker and DataUpdater.Server start requests #375

Closed
rbino opened this issue May 14, 2020 · 0 comments
Assignees
Labels
app:data_updater_plant This issue or pull request is about astarte_data_updater_plant application bug Something isn't working

Comments

@rbino
Copy link
Collaborator

rbino commented May 14, 2020

Currently, MessageTracker and DataUpdater.Server starts can be triggered from two different points: handling a message coming from VerneMQ (called from AMQPDataConsumer) or handling an RPC call (called from RPC.Server).

This causes two problems: first, there's a race condition between the Registry lookup and the call to start for both types of processes. The second problem is that if the MessageTracker process is started from RPC.Server, it uses it as acknowledger, but this does not make sense since the acknowledger is used to ack data messages. This also has the side-effect of AMQPDataConsumer never detecting crashes in MessageTracker, leading to possible stalls in Data Updater Plant queues.

To avoid all these problems, the start of MessageTrackers and DataUpdater.Servers should always be serialized through AMQPDataConsumer.

@rbino rbino added bug Something isn't working app:data_updater_plant This issue or pull request is about astarte_data_updater_plant application labels May 14, 2020
@rbino rbino self-assigned this May 14, 2020
rbino added a commit to rbino/astarte that referenced this issue May 14, 2020
Avoid stalling a Data Updater when it is started through an RPC call instead of
being started by AMQPDataConsumer.

Fix astarte-platform#375

Signed-off-by: Riccardo Binetti <riccardo.binetti@ispirata.com>
@bettio bettio closed this as completed in 216a4ba May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:data_updater_plant This issue or pull request is about astarte_data_updater_plant application bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant