Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

MSC2716 batch sending breaks when using event persistence workers #11219

Closed
tulir opened this issue Oct 30, 2021 · 3 comments · Fixed by #11220
Closed

MSC2716 batch sending breaks when using event persistence workers #11219

tulir opened this issue Oct 30, 2021 · 3 comments · Fixed by #11220
Assignees
Labels
S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@tulir
Copy link
Member

tulir commented Oct 30, 2021

Steps to reproduce

  • Have a Synapse instance with workers
  • Use MSC2716 /batch_sending

Expected result: successful batch send

Actual result: internal server error

2021-10-30 11:51:57,760 - synapse.http.server - 97 - ERROR - POST-144- Failed handle request via 'ReplicationSendEventRestServlet': <SynapseRequest at 0x7f65c3d460a0 method='POST' uri='/_synapse/replication/send_event/%24163559471743RetmW%3Amaunium.net/wwYpCVkpSn' clientproto='HTTP/1.1' site=8034>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/defer.py", line 1661, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/usr/local/lib/python3.9/site-packages/synapse/replication/http/send_event.py", line 129, in _handle_request
    event = await self.event_creation_handler.persist_and_notify_client_event(
  File "/usr/local/lib/python3.9/site-packages/synapse/handlers/message.py", line 1507, in persist_and_notify_client_event
    await self.store.get_insertion_event_by_batch_id(
AttributeError: 'GenericWorkerSlavedStore' object has no attribute 'get_insertion_event_by_batch_id'
2021-10-30 11:51:57,763 - synapse.access.http.8034 - 400 - INFO - POST-144- 172.18.2.50 - 8034 - {@whatsappbot:maunium.net} Processed request: 0.006sec/0.000sec (0.002sec, 0.000sec) (0.000sec/0.001sec/2) 55B 500 "POST /_synapse/replication/send_event/%24163559471743RetmW%3Amaunium.net/wwYpCVkpSn HTTP/1.1" "Synapse/1.46.0rc1" [1 dbevts]

Version information

  • Version: 1.45.1, 1.46.0rc1
  • Platform: Docker
@squahtx
Copy link
Contributor

squahtx commented Nov 1, 2021

#11165 tracks data store typings that would have caught this bug.

@erikjohnston erikjohnston added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Nov 1, 2021
@MadLittleMods MadLittleMods assigned tulir and unassigned MadLittleMods Nov 2, 2021
@richvdh
Copy link
Member

richvdh commented Nov 26, 2021

@tulir
Copy link
Member Author

tulir commented Nov 26, 2021

The error in this issue was a simple missing import/base class, but I also found another error which was a bit more complicated. Both of them are solved in #11220

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants