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

ISSUE-1307 Allow to specify secondary bucket suffix #1309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

quantranhong1999
Copy link
Member

resolve #1307

@quantranhong1999 quantranhong1999 force-pushed the secondary-blob-store-bucket-name-prefix branch from 49e01b7 to e73bc02 Compare November 15, 2024 07:31
@quantranhong1999 quantranhong1999 changed the title ISSUE-1307 Allow to specify secondary bucket prefix ISSUE-1307 Allow to specify secondary bucket suffix Nov 15, 2024

private Mono<Void> readFromPrimaryAndSaveToSecondary(BucketName bucketName, BlobId blobId) {
return Mono.from(primaryBlobStoreDAO.readReactive(bucketName, blobId))
.flatMap(inputStream -> Mono.from(secondaryBlobStoreDAO.save(withSuffix(bucketName, secondaryBucketSuffix), blobId, inputStream)))
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
.flatMap(inputStream -> Mono.from(secondaryBlobStoreDAO.save(withSuffix(bucketName, secondaryBucketSuffix), blobId, inputStream)))
.flatMap(inputStream -> Mono.from(secondaryBlobStoreDAO.save(withSuffix(bucketName), blobId, inputStream)))

Copy link
Member Author

@quantranhong1999 quantranhong1999 left a comment

Choose a reason for hiding this comment

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

Explicit test about empty

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.

[CNB] Add optional suffix for bucket names of secondary blob store
4 participants