Page MenuHomePhabricator

[services] Add attachment delimiter
ClosedPublic

Authored by karol on May 19 2022, 3:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 10:34 AM
Unknown Object (File)
Fri, Dec 20, 6:37 AM
Unknown Object (File)
Mon, Dec 9, 6:58 AM
Unknown Object (File)
Sat, Nov 30, 6:58 AM
Unknown Object (File)
Thu, Nov 28, 3:36 AM
Unknown Object (File)
Nov 20 2024, 5:01 PM
Unknown Object (File)
Nov 20 2024, 5:00 PM
Unknown Object (File)
Nov 14 2024, 10:22 AM

Details

Summary

Depends on D4075

Adding an attachment holders delimiter. Holders are built from:

  • hashes - these are hexadecimal values - 0 to 9 and A to F (or lower case)
  • uuid - also hexadecimal - 0 to 9 and A to F (or lower case)
  • ID_SEPARATOR - :

So it's impossible to have ; character that would not be a delimiter.

Test Plan

Services still build

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
services/lib/src/GlobalConstants.h
25 ↗(On Diff #12920)

Is it attachment-specific, or can be used to separate any id? Maybe we can rename it to ID_DELIMITER?

This revision is now accepted and ready to land.May 23 2022, 4:40 AM
services/lib/src/GlobalConstants.h
25 ↗(On Diff #12920)

It's attachment-specific. Once we start using it with any other ids, we can rename it. It's crucial however to make sure that in the id pattern we want to use this, there's no way to have the delimiter character that could be a part of any id. In other words - if we use this delimiter for ids that are generated with the pattern that allows the delimiter character in the id, then we're lost. I explicitly made sure this delimiter will not occur in attachment ids.

services/lib/src/GlobalConstants.h
25 ↗(On Diff #12920)

Agree with @karol-bisztyga

This revision was automatically updated to reflect the committed changes.