Page MenuHomePhabricator

[services] Tunnelbroker - Switching to use composite key in a messageItem entity
ClosedPublic

Authored by max on Jul 7 2022, 6:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 6:45 AM
Unknown Object (File)
Fri, Sep 27, 7:42 PM
Unknown Object (File)
Fri, Sep 27, 12:23 AM
Unknown Object (File)
Fri, Sep 27, 12:23 AM
Unknown Object (File)
Fri, Sep 27, 12:22 AM
Unknown Object (File)
Fri, Sep 27, 12:19 AM
Unknown Object (File)
Tue, Sep 17, 10:00 AM
Unknown Object (File)
Tue, Sep 17, 2:48 AM

Details

Summary

To avoid possible message UUID collision and speedup batch messages deletion we should switch to using the composite key for the tunnelbroker-messages
table which will consist of messagesID as a Sort Key and toDeviceID as a Partition key.

This diff is a part of the stack and introduces changes to MessageItem database entity.

Linear task: ENG-1362

Test Plan

We can use the current MessageItem related tests located at services/tunnelbroker/test/DatabaseManagerTest.cpp.
When running yarn test-tunnelbroker-service-in-sandbox test should not fail including MessageItem related tests:

  • PutAndFoundMessageItemsStaticDataIsSame
  • PutAndFoundMessageItemsGeneratedDataIsSame
  • PutAndFoundByReceiverMessageItemsDataIsSame

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Jul 7 2022, 7:05 AM
max edited the test plan for this revision. (Show Details)
max added reviewers: karol, tomek.
tomek added 1 blocking reviewer(s): karol.
This revision is now accepted and ready to land.Jul 11 2022, 3:08 AM