Page MenuHomePhabricator

[lib] fix processing DM ops by adding `MessageSourceMetadata` param
ClosedPublic

Authored by kamil on Aug 7 2024, 1:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 8, 2:06 PM
Unknown Object (File)
Sun, Sep 8, 2:06 PM
Unknown Object (File)
Sun, Sep 8, 2:06 PM
Unknown Object (File)
Sat, Sep 7, 1:48 PM
Unknown Object (File)
Sat, Sep 7, 11:37 AM
Unknown Object (File)
Sat, Sep 7, 11:36 AM
Unknown Object (File)
Thu, Sep 5, 12:49 PM
Unknown Object (File)
Wed, Sep 4, 1:49 AM
Subscribers
None

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Aug 7 2024, 1:45 AM
tomek added inline comments.
lib/shared/dm-ops/process-dm-ops.js
58–62 ↗(On Diff #43216)

We could also consider modifying dispatchWithMessageSource to take metadata as an optional parameter, which would allow for simplifying the code here.

This revision is now accepted and ready to land.Aug 7 2024, 2:50 AM

Do we need DMOpsQueueHandler to pass in MessageSourceMetadata as well?

Do we need DMOpsQueueHandler to pass in MessageSourceMetadata as well?

No, we decided to pass in MessageSourceMetadata on queueDMOpsActionType- and as a result message will be confirmed as processed after queueing up this DM action.

This should be safe because we persist queued operations, and since there are pruned there is still a risk that operation will never be applied to the store (so the risk is still there, and I think was considered when implementing queue). We can update the code to send confirmation after processing or pruning (but this will require changing pruning logic).

This revision was landed with ongoing or failed builds.Aug 8 2024, 2:33 AM
This revision was automatically updated to reflect the committed changes.