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)
Sat, Nov 2, 2:21 PM
Unknown Object (File)
Sat, Nov 2, 2:21 PM
Unknown Object (File)
Sat, Nov 2, 2:21 PM
Unknown Object (File)
Sat, Nov 2, 2:17 PM
Unknown Object (File)
Wed, Oct 16, 7:53 AM
Unknown Object (File)
Mon, Oct 7, 4:47 AM
Unknown Object (File)
Mon, Oct 7, 4:47 AM
Unknown Object (File)
Mon, Oct 7, 4:47 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