Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blob-store based oplog archive #538

Merged
merged 6 commits into from
May 31, 2024
Merged

Blob-store based oplog archive #538

merged 6 commits into from
May 31, 2024

Conversation

vigoo
Copy link
Contributor

@vigoo vigoo commented May 30, 2024

Resolves #216

Contains refactorings related to #502

Introduces OwnedWorkerId, a combination of WorkerId and AccountId and uses it in most places in the worker executor where previously worker and account IDs were passed separately. Also the number of places where this type is needed (the additional account ID) increased because now the oplog requires to have an associated account ID for each operation. Although this change increases the required information to be transferred in many cases, it unified the API a bit as now everything requires a combination of worker id and account id: this can be explained by worker executor needs to know who owns the worker, but it does not want to query an external service to determine so - so this information must be passed from the outer layers where authorization already calculated the information anyway (or in case all worker belongs to the same account, it is passed as a constant value).

The primary reason for passing this ownership information down to the oplog service is to be able to store oplog archives grouped by accounts, similarly how custom blobs are already stored grouped by accounts. This is good for various security and privacy reasons and can support some planned features.

@vigoo vigoo marked this pull request as ready for review May 30, 2024 15:30
@@ -155,9 +331,14 @@ pub enum BlobStorageNamespace {
account_id: AccountId,
worker_id: WorkerId,
},
CompressedOplog {
account_id: AccountId,
component_id: ComponentId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there reason why here is component_id and not worker_id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way it was easy to implement the equivalent of redis SCAN without changing / extending the blob storage interface.

@vigoo vigoo enabled auto-merge (squash) May 31, 2024 07:49
@vigoo vigoo merged commit 6c713a5 into main May 31, 2024
14 checks passed
@vigoo vigoo deleted the vigoo/s3-oplog branch May 31, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi layer oplog store, enabling an S3 backend
3 participants