Fix/BEAM-3815 - Switching accounts too fast throw error with HeartBeat #2859
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.
Attempt to fix issue with heartbeat erroring while users are being changed
Ticket
https://disruptorbeam.atlassian.net/browse/BEAM-3815
Brief Description
If you change users fast enough and while the SDK is sending a HeartBeat to the server, it's possible to get
an error where it complains that the user being sent by the HeartBeat is not the actual user.
Now we are waiting for an user change to happen before sending the heartbeat. The error still might occur in
the case that, for some weird reason not found yet, the heartbeat was send before the user start changing, and
somehow the change happens before the heartbeat finishs.
Checklist
Add those to list or remove the list below altogether:
Notes
When you are merging a feature branch into
main
, please squash merge and make sure the final commit contains any relevent JIRA ticket number. If you are merging frommain
tostaging
, orstaging
toproduction
, please use a regular merge commit.Does this introduce tech-debt? If so, have you added an entry to the Tech-debt document?