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

Add a note about REPLICATE requiring a single space #7323

Closed
wants to merge 2 commits into from

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Apr 22, 2020

Otherwise errors happen server-side. A more correct fix might be to just remove the requirement, though given this is the only command which shows up bare it's probably fine to just document it instead.

The error, for reference:

2020-04-22 02:41:58,808 - twisted - 192 - CRITICAL -  - Unhandled Error
Traceback (most recent call last):
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/python/log.py", line 103, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
    why = selectable.doRead()
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 243, in doRead
    return self._dataReceived(data)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/twisted/protocols/basic.py", line 454, in dataReceived
    self.lineReceived(line)
  File "/home/matrix/.synapse/local/lib/python3.6/site-packages/synapse/replication/tcp/protocol.py", line 214, in lineReceived
    idx = linestr.index(" ")
builtins.ValueError: substring not found

This behaviour was added in #7024

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
  • Pull request includes a sign off
  • Code style is correct (run the linters)

Done with a community hat on:

Signed-off-by: Travis Ralston <travis@t2bot.io>

Otherwise errors happen server-side. A more correct fix might be to just remove the requirement, though given this is the only command which shows up bare it's probably fine to just document it instead.
@turt2live turt2live requested a review from a team April 22, 2020 02:46
@richvdh
Copy link
Member

richvdh commented Apr 22, 2020

what a massive idiot I am. I tried to fix this in e13c6c7, but was too lazy to write tests, and messed it up. I'll have another go.

@richvdh
Copy link
Member

richvdh commented Apr 22, 2020

going to close this in favour of #7326. Thanks though!

@richvdh richvdh closed this Apr 22, 2020
@anoadragon453 anoadragon453 deleted the travis/tcp-replicate-update branch April 22, 2020 13:13
@turt2live
Copy link
Member Author

Looks like the fix was easier than anticipated too - thanks for taking a look :D

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

Successfully merging this pull request may close these issues.

2 participants