Page MenuHomePhabricator

[lib] Check ID conflicts when processing operations
ClosedPublic

Authored by tomek on Wed, Sep 25, 10:13 AM.
Tags
None
Referenced Files
F2840569: D13464.diff
Sun, Sep 29, 6:23 AM
Unknown Object (File)
Fri, Sep 27, 11:38 PM
Unknown Object (File)
Fri, Sep 27, 10:56 AM
Unknown Object (File)
Fri, Sep 27, 10:47 AM
Unknown Object (File)
Fri, Sep 27, 3:29 AM
Unknown Object (File)
Wed, Sep 25, 12:22 PM
Unknown Object (File)
Wed, Sep 25, 12:21 PM
Unknown Object (File)
Wed, Sep 25, 12:04 PM
Subscribers

Details

Summary

We should check whether an entity with the same ID exists and discard an operation in a case of conflict

https://linear.app/comm/issue/ENG-9190/alternative-solution-update-canbeprocessed-functions

Test Plan

Tested some scenarios:

  1. Repeated text message with the same ID
  2. Creating sidebars with
    1. the same thread ID
    2. the same sidebar source message ID
    3. the same create sidebar message ID
  3. Repeated changing thread settings with the same message ID prefix

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Check message ID conflict for all the operations

Validate change thread settings operation

Check create sidebar message conflicts

kamil added inline comments.
lib/shared/dm-ops/process-dm-ops.js
150–161 ↗(On Diff #44589)

Do you think we can merge these two and use Promise.all?

This revision is now accepted and ready to land.Thu, Sep 26, 7:25 AM