summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-01-25 14:31:05 +0000
committerGitHub <noreply@github.com>2019-01-25 14:31:05 +0000
commit57c035debe904c4a2887c981dbf48acfb9a87ce7 (patch)
tree1262900b08616aa08768d9883349b11725218528
parentFix quoting for allowed_local_3pids example config (#4476) (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/sqlite_nat... (diff)
downloadsynapse-57c035debe904c4a2887c981dbf48acfb9a87ce7.tar.xz
Merge pull request #4471 from matrix-org/erikj/sqlite_native_upsert
Disable native upsert on sqlite
-rw-r--r--changelog.d/4306.misc2
-rw-r--r--changelog.d/4471.misc1
-rw-r--r--synapse/storage/engines/sqlite.py10
3 files changed, 9 insertions, 4 deletions
diff --git a/changelog.d/4306.misc b/changelog.d/4306.misc
index 58130b6190..7f48b02fbf 100644
--- a/changelog.d/4306.misc
+++ b/changelog.d/4306.misc
@@ -1 +1 @@
-Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
+Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+.
diff --git a/changelog.d/4471.misc b/changelog.d/4471.misc
new file mode 100644
index 0000000000..7f48b02fbf
--- /dev/null
+++ b/changelog.d/4471.misc
@@ -0,0 +1 @@
+Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+.
diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py
index 059ab81055..31b8449ca1 100644
--- a/synapse/storage/engines/sqlite.py
+++ b/synapse/storage/engines/sqlite.py
@@ -33,10 +33,14 @@ class Sqlite3Engine(object):
     @property
     def can_native_upsert(self):
         """
-        Do we support native UPSERTs? This requires SQLite3 3.24+, plus some
-        more work we haven't done yet to tell what was inserted vs updated.
+        Do we support native UPSERTs?
         """
-        return self.module.sqlite_version_info >= (3, 24, 0)
+        # SQLite3 3.24+ supports them, but empirically the unit tests don't work
+        # when its enabled.
+        # FIXME: Figure out what is wrong so we can re-enable native upserts
+
+        # return self.module.sqlite_version_info >= (3, 24, 0)
+        return False
 
     def check_database(self, txn):
         pass