HomePhabricator
Diffusion Comm 6b1b41cd1e3d

[backup] Namespace log id in db

Description

[backup] Namespace log id in db

Summary: This was an idea that I wanted to implement but forgot before. We can prefix the backupID partitioning key in the log table with the userID. I think this is better because it allows us to map the log directly to the backup in the backup table (before we didn't knew the userID which is the partitioning key of the backup table). This is a quick change and we still aren't using backup service in production so I decided to implement it now. An alternative would be to add a new attribute but I prefer to keep them both in the partitioning key as they really represent a one things -> a specific backup of a given user. And if we ever need to iterate over specific user's logs we will also need to iterate over the compaction data so it wouldn't gain us anything.

Test Plan: Run backup integration tests.

Reviewers: bartek

Reviewed By: bartek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10857

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Jan 26 2024, 6:37 AM
Reviewer
bartek
Differential Revision
D10857: [backup] Namespace log id in db
Parents
rCOMM0fa01a00c651: [CI] Switch Emscripten CI job to mac runners
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM6b1b41cd1e3d: [backup] Namespace log id in db (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Feb 23 2024, 8:44 AM