From 8bb3dd07a438276446b7616f94e6f208f63b1afe Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 30 Mar 2017 13:37:11 +0100 Subject: [PATCH] continue when ops are out of order --- services/track-changes/app/coffee/UpdatesManager.coffee | 2 -- .../test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/services/track-changes/app/coffee/UpdatesManager.coffee b/services/track-changes/app/coffee/UpdatesManager.coffee index fa56f463cd..f01681e5f0 100644 --- a/services/track-changes/app/coffee/UpdatesManager.coffee +++ b/services/track-changes/app/coffee/UpdatesManager.coffee @@ -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 diff --git a/services/track-changes/test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee b/services/track-changes/test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee index dd0ba835d3..c422fffec0 100644 --- a/services/track-changes/test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee +++ b/services/track-changes/test/unit/coffee/UpdatesManager/UpdatesManagerTests.coffee @@ -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", ->