mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-24 02:41:16 +00:00
continue when ops are out of order
This commit is contained in:
parent
d29141d583
commit
8bb3dd07a4
2 changed files with 1 additions and 3 deletions
|
@ -22,8 +22,6 @@ module.exports = UpdatesManager =
|
|||
prevVersion = rawUpdates[i-1]?.v
|
||||
if not (prevVersion < thisVersion)
|
||||
logger.error project_id: project_id, doc_id: doc_id, rawUpdates:rawUpdates, temporary: temporary, thisVersion:thisVersion, prevVersion:prevVersion, "op versions out of order"
|
||||
# TODO try to recover by sorting the ops
|
||||
return callback(new Error("incoming op versions out of order"))
|
||||
|
||||
# FIXME: we no longer need the lastCompressedUpdate, so change functions not to need it
|
||||
# CORRECTION: we do use it to log the time in case of error
|
||||
|
|
|
@ -144,7 +144,7 @@ describe "UpdatesManager", ->
|
|||
|
||||
it "should call the callback with an error", ->
|
||||
@callback
|
||||
.calledWith(new Error("incoming op versions out of order"))
|
||||
.calledWith(new Error)
|
||||
.should.equal true
|
||||
|
||||
it "should not insert any update into mongo", ->
|
||||
|
|
Loading…
Reference in a new issue