diff options
author | drebs <drebs@leap.se> | 2015-05-07 14:49:40 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-05-20 10:16:46 -0300 |
commit | eae4468d99029006cc36a021e82350a0f62f7006 (patch) | |
tree | deb6b03134dbb6e7f61f4c339e4d621be885131e /client/changes/bug_6757_fix-order-of-insertion-when-syncing | |
parent | 3a7ddacd06fd57afb10cc3d7083c2aa196c9328f (diff) |
[bug] fix order of insertion of decrypted docs
This commit actually does some different things:
* When doing asynchronous decryption of incoming documents in soledad client
during a sync, there was the possibility that a document corresponding to
a newer generation would be decrypted and inserted in the local database
before a document corresponding to an older generation. When this
happened, the metadata about the target database (i.e. its locally-known
generation) would be first updated to the newer generation, and then an
attempt to insert a document corresponding to an older generation would
cause the infamous InvalidGeneration error.
To fix that we use the sync-index information that is contained in the
sync stream to correctly find the insertable docs to be inserted in the
local database, thus avoiding the problem described above.
* Refactor the sync encrypt/decrypt pool to its own file.
* Fix the use of twisted adbapi with multiprocessing.
Closes: #6757.
Diffstat (limited to 'client/changes/bug_6757_fix-order-of-insertion-when-syncing')
-rw-r--r-- | client/changes/bug_6757_fix-order-of-insertion-when-syncing | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/changes/bug_6757_fix-order-of-insertion-when-syncing b/client/changes/bug_6757_fix-order-of-insertion-when-syncing new file mode 100644 index 00000000..c0470f5a --- /dev/null +++ b/client/changes/bug_6757_fix-order-of-insertion-when-syncing @@ -0,0 +1,2 @@ + o Fix the order of insertion of documents when using workers for decrypting + incoming documents during a sync. Closes #6757. |