Page MenuHomePhabricator

[lib] Check ID conflicts when processing operations
ClosedPublic

Authored by tomek on Sep 25 2024, 10:13 AM.
Tags
None
Referenced Files
F3516508: D13464.id44625.diff
Sun, Dec 22, 2:43 PM
F3516400: D13464.id44621.diff
Sun, Dec 22, 2:18 PM
Unknown Object (File)
Thu, Dec 19, 7:36 AM
Unknown Object (File)
Thu, Dec 19, 7:35 AM
Unknown Object (File)
Thu, Dec 19, 7:35 AM
Unknown Object (File)
Wed, Dec 4, 6:42 PM
Unknown Object (File)
Wed, Dec 4, 6:00 PM
Unknown Object (File)
Fri, Nov 29, 4:41 AM
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.Sep 26 2024, 7:25 AM