Page MenuHomePhabricator

[lib] Check ID conflicts when processing operations
ClosedPublic

Authored by tomek on Sep 25 2024, 10:13 AM.
Tags
None
Referenced Files
F3298908: D13464.id44589.diff
Sun, Nov 17, 9:53 AM
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Fri, Nov 8, 3:00 AM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Unknown Object (File)
Tue, Oct 22, 1:18 PM
Unknown Object (File)
Tue, Oct 22, 10:22 AM
Unknown Object (File)
Tue, Oct 22, 10:22 AM
Unknown Object (File)
Tue, Oct 22, 10:22 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
No Lint Coverage
Unit
No Test Coverage

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