Page MenuHomePhabricator

[services] Add attachment delimiter
ClosedPublic

Authored by karol on May 19 2022, 3:01 AM.
Tags
None
Referenced Files
F3536290: D4076.id12920.diff
Wed, Dec 25, 6:10 PM
F3536262: D4076.id13113.diff
Wed, Dec 25, 6:01 PM
F3531159: D4076.diff
Wed, Dec 25, 6:27 AM
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

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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
services/lib/src/GlobalConstants.h
25

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

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

Agree with @karol-bisztyga

This revision was automatically updated to reflect the committed changes.