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

[Multitenant] S3 multitenancy: prefix #5274

Open
Arsnael opened this issue Sep 18, 2024 · 2 comments
Open

[Multitenant] S3 multitenancy: prefix #5274

Arsnael opened this issue Sep 18, 2024 · 2 comments

Comments

@Arsnael
Copy link
Member

Arsnael commented Sep 18, 2024

Implement the prefix implementation for S3 blobstore multitenancy.

Within BlobStoreDAO, when using the prefix mode, derive the object key within S3 adding the prefix as needed.

For example: tenant/abc

Note: This interact with the GC!!! We shall make sure the GC, when listing, only takes the last part of the s3Key IE given prefix/ABC the GC only uses ABC as a blobID.

DoD: Integration tests

@vttranlina
Copy link
Member

Note: This interact with the GC!!! We shall make sure the GC, when listing, only takes the last part of the s3Key IE given prefix/ABC the GC only uses ABC as a blobID.

If I understand correctly:

  • During blobStoreDAO.save, when input is Bucket(bucketName = "bucket1", Optional<Tenant> = "tenant1"), BlobId("abc") , the data will be saved in S3 as: bucket = bucket1 and object = "tenant1/abc".

  • When calling the BloomFilterGCAlgorithm#gc method, the blobStoreDAO.listBlobs("bucket1") will return BlobId("tenant1/abc").

  • Then extract this as: bucket = Bucket("bucket1", "tenant1") and blobIdWillGc = BlobId("abc").

  • Finally, use these values in blobStoreDAO.delete(bucket, blobIdWillGc).

Is this correct?

@quantranhong1999
Copy link
Member

During blobStoreDAO.save, when input is Bucket(bucketName = "bucket1", Optional = "tenant1"), BlobId("abc") , the data will be saved in S3 as: bucket = bucket1 and object = "tenant1/abc".
When calling the BloomFilterGCAlgorithm#gc method, the blobStoreDAO.listBlobs("bucket1") will return BlobId("tenant1/abc").

BlobId("abc") and BlobId("tenant1/abc") points to the same blob?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants