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)
Sat, Nov 2, 6:18 AM
Unknown Object (File)
Sat, Nov 2, 6:17 AM
Unknown Object (File)
Sat, Nov 2, 6:17 AM
Unknown Object (File)
Sat, Nov 2, 6:16 AM
Unknown Object (File)
Sat, Nov 2, 6:16 AM
Unknown Object (File)
Sat, Nov 2, 5:56 AM
Unknown Object (File)
Tue, Oct 22, 6:29 PM
Unknown Object (File)
Fri, Oct 18, 5:15 PM
Subscribers
None

Diff Detail

Repository
rCOMM Comm
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

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.