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)
Tue, Nov 26, 8:33 AM
Unknown Object (File)
Tue, Nov 26, 8:25 AM
Unknown Object (File)
Tue, Nov 19, 10:39 AM
Unknown Object (File)
Mon, Nov 11, 5:00 AM
Unknown Object (File)
Sun, Nov 10, 8:08 PM
Unknown Object (File)
Sun, Nov 10, 9:02 AM
Unknown Object (File)
Sat, Nov 9, 10:30 PM
Unknown Object (File)
Sat, Nov 9, 7:38 PM
Subscribers
None

Diff Detail

Repository
rCOMM Comm
Branch
land-fixes
Lint
No Lint Coverage
Unit
No Test Coverage

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.