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 /scripts/db_access/reset_db.py | |
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 'scripts/db_access/reset_db.py')
0 files changed, 0 insertions, 0 deletions