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
Appservice incorrectly handling a batch of events with the same transaction ID #2718
Comments
tak-hntlabs
added a commit
to tak-hntlabs/dendrite
that referenced
this issue
Sep 14, 2022
tak-hntlabs
added a commit
to HereNotThere/dendrite
that referenced
this issue
Sep 14, 2022
tak-hntlabs
added a commit
to HereNotThere/dendrite
that referenced
this issue
Sep 15, 2022
) * temporary fix for dendrite regression matrix-org#2718 * Change comment to match with dendrite main pr * renamed zion-registration.yaml to zion-appservice.yaml. Change gitignore to ignore this file. Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
tak-hntlabs
added a commit
to HereNotThere/dendrite
that referenced
this issue
Sep 16, 2022
tak-hntlabs
added a commit
to HereNotThere/dendrite
that referenced
this issue
Sep 16, 2022
Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background information
go version
: go version go1.19 darwin/amd64Description
I am seeing a regression with appservice. I am working on an appservice that uses the matrix-bot-sdk. My appservice was working prior to this PR that was merged: Refactor appservices component
Before the PR was merged, my appservice is able to see all events associated with a new space/ room creation. When a space is created, it was able to see all the related events - room.create, room.join, etc. After pulling the latest main, the appservice is no longer able to see the events when a space is created.
I traced it to this logic in appservice/consumers/roomserver.go. In line 178 of the func sendEvents( ... ):
txnID := events[0].Event.OriginServerTS()
What's happening is that the batch of events associated with space / room creation has the same OriginServerTS(). Dendrite sends the first event to the appservice. The appservice processes the event, and completes the transaction. The sendEvents func is invoked again with the rest of the events. The txnID is exactly the same as before. Consequently, the appservice thinks that this transaction has been processed, and ignores the events.
Who is affected:
I am building on matrix-bot-sdk. This regression could affect any projects using that sdk. Didn't try other appservice sdk.
How is this bug manifesting:
Configure an appservice (based on matrix-bot-sdk). Create a space or a room. Appservice no longer gets all the associated events with creating the room.
When did this first appear:
After this PR was merged: Refactor appservices component
I will create a PR for fixing it. Will gather feedback in the PR.
The text was updated successfully, but these errors were encountered: