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

Commit

Permalink
Revert "Merge pull request #4471 from matrix-org/erikj/sqlite_native_…
Browse files Browse the repository at this point in the history
…upsert"

This reverts commit 57c035d, reversing
changes made to 4a3f138.
  • Loading branch information
hawkowl committed Jan 28, 2019
1 parent 28c13d7 commit afcb81e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion changelog.d/4306.misc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+.
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
1 change: 0 additions & 1 deletion changelog.d/4471.misc

This file was deleted.

10 changes: 3 additions & 7 deletions synapse/storage/engines/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@ def __init__(self, database_module, database_config):
@property
def can_native_upsert(self):
"""
Do we support native UPSERTs?
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.
"""
# 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
return self.module.sqlite_version_info >= (3, 24, 0)

def check_database(self, txn):
pass
Expand Down

0 comments on commit afcb81e

Please sign in to comment.