fix: await in sequence - #49
Conversation
| for (let i = 0; i < data.length - 1; i += 2) { | ||
| let action = data[i] | ||
| let meta = data[i + 1] | ||
| const action = data[i] |
There was a problem hiding this comment.
Can you revert this change? It breaks CI since we use another code standard.
|
Good fix. I added We need to release it as major release. Do you need to release it quickly (or you found some hacky workaround)? |
@ai a quicker release would be preferred, but appreciate whatever works best for you! |
|
I will try to do the release on weekend |
|
Done. I released Logux Core 0.8 (release name |
It's critical that any list of messages coming in are added to the log in the right order.
We have channels/actions that write this incoming data into the database upon adding to the log.
It can potentially run out of order because we run lines 74-78:
core/sync/index.js
Lines 74 to 81 in 0a021be
the
inFilteris actually another promise, and onlogux/server, it awaitsprocessor.access:https://github.com/logux/server/blob/63337798eea393fbeee1c6cb519bce3ae71ef354/server-client/index.js#L214
This means the
this.log.addand subsequentprocessor.processcould be out of order.