summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-07 12:08:35 +0100
committerErik Johnston <erik@matrix.org>2015-04-07 12:08:35 +0100
commit0af5f5efaf0b24187514cf78d7982ef9b85a208c (patch)
tree5f1b40032b349e5743af333124d6fcea0b5213e0 /synapse/storage/_base.py
parentImplement or_ignore flag on inserts (diff)
downloadsynapse-0af5f5efaf0b24187514cf78d7982ef9b85a208c.tar.xz
Don't use multiple UNIQUE constraints; it will cause deadlocks
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index a0c1718c27..4ac61be895 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -837,11 +837,11 @@ class SQLBaseStore(object):
             return curr_time
 
         logger.debug("Got js: %r", js)
-        d = json.loads(js)
+        d = json.loads(str(js).decode("utf8"))
         start_time = update_counter("decode_json", start_time)
 
         logger.debug("Got internal_metadata: %r", internal_metadata)
-        internal_metadata = json.loads(internal_metadata)
+        internal_metadata = json.loads(str(internal_metadata).decode("utf8"))
         start_time = update_counter("decode_internal", start_time)
 
         ev = FrozenEvent(d, internal_metadata_dict=internal_metadata)