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

Fix replication after switch to simplejson #3015

Merged
merged 2 commits into from
Mar 20, 2018

Conversation

erikjohnston
Copy link
Member

Turns out that simplejson serialises namedtuple's as dictionaries rather
than tuples by default.

Turns out that simplejson serialises namedtuple's as dictionaries rather
than tuples by default.
@@ -107,7 +107,7 @@ def to_line(self):
return " ".join((
self.stream_name,
str(self.token) if self.token is not None else "batch",
json.dumps(self.row),
json.dumps(self.row, namedtuple_as_object=False),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you're going to rely on stuff that's only in simplejson, you ought to import it as simplejson rather than json.

Of course, this blows my "simplejson is the same as json" stuff out of the water...

@richvdh richvdh assigned erikjohnston and unassigned richvdh Mar 20, 2018
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@erikjohnston erikjohnston merged commit 5bdb57c into develop Mar 20, 2018
krombel added a commit to krombel/synapse that referenced this pull request Mar 26, 2018
Changes in synapse v0.27.2 (2018-03-26)
=======================================

Bug fixes:

* Fix bug which broke TCP replication between workers (PR matrix-org#3015)
@erikjohnston erikjohnston deleted the erikj/simplejson_replication branch September 20, 2018 13:59
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