summary refs log tree commit diff
path: root/synapse/storage/transactions.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-07 12:05:36 +0100
committerErik Johnston <erik@matrix.org>2015-04-07 12:05:36 +0100
commit304111afd0fdda6a0c58d81238a1bbfa7f318208 (patch)
treebfa6ce488926c27a6820f8c6a7e78743faa2b5e4 /synapse/storage/transactions.py
parentExplicitly name the __main__ module logger (diff)
downloadsynapse-304111afd0fdda6a0c58d81238a1bbfa7f318208.tar.xz
Don't use AUTOINCREMENT, use an in memory version
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r--synapse/storage/transactions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index e3e484fb2d..9594fe1f2b 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -123,6 +123,8 @@ class TransactionStore(SQLBaseStore):
     def _prep_send_transaction(self, txn, transaction_id, destination,
                                origin_server_ts):
 
+        next_id = self._transaction_id_gen.get_next_txn(txn)
+
         # First we find out what the prev_txns should be.
         # Since we know that we are only sending one transaction at a time,
         # we can simply take the last one.
@@ -143,7 +145,7 @@ class TransactionStore(SQLBaseStore):
             txn,
             table=SentTransactions.table_name,
             values={
-                "id": self.get_next_stream_id(),
+                "id": next_id,
                 "transaction_id": transaction_id,
                 "destination": destination,
                 "ts": origin_server_ts,