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

Events can be processed out of order #510

Open
debdutdeb opened this issue Oct 6, 2024 · 0 comments
Open

Events can be processed out of order #510

debdutdeb opened this issue Oct 6, 2024 · 0 comments

Comments

@debdutdeb
Copy link

It seems like we can get into an out of order insertion of events into the in-memory queue.

The event is processed synchronously - https://github.com/matrix-org/matrix-appservice-node/blob/20b8fdc0f2c6acfd71638bc1d12fef0666b9cd6d/src/app-service.ts#L294

But bridge uses async callbacks, that can cause the actual insertion to defer.

for eeEventBroker -

if (this.eeEventBroker) {
passthrough = await this.eeEventBroker.onASEvent(weakEvent);
, enqueued here.

another possibility -

// Event rejected.
if (!await this.validateEditEvent(event, relatesTo.event_id, editOptions.allowEventOnLookupFail)) {

Am I missing some context while reading the code? Could someone please clarify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant