     }
 
     func notifiyTransactionEnded(wasRolledBack wasRolledBack: Bool) {
-        Dispatch.asynchronouslyOn(databaseTransactionEnded) {
-            self.transactionEnded.handle(next: ())
+        Dispatch.asynchronouslyOn(databaseWriteTransactionEndedQueue) {
+            self.databaseWriteTransactionEnded.handle(next: ())
         }
     }
 

    private var cacheUpdatesBySnapshot: [UInt64: [String: TypeErasedCacheUpdates]]
    private var minCacheUpdatesSnapshot: UInt64

    private let transactionEnded: Subject<Void>
    private let databaseTransactionEnded: Dispatch.Queue

    private let databaseWriteQueue: Dispatch.Queue
    private let connectionSetUpQueue: Dispatch.Queue

        return observingConnection
    }

    public var writeTransactionEnded: Observable<Void> {
        return databaseWriteTransactionEnded
    }

    // MARK: Internal methods
