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

[Remote Store] BlobStore used in Remote Store doesn't use updated settings and repo metadata #9118

Closed
gbbafna opened this issue Aug 4, 2023 · 2 comments · Fixed by #9569
Closed
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework Storage Issues and PRs relating to data and metadata storage v2.11.0 Issues and PRs related to version 2.11.0

Comments

@gbbafna
Copy link
Collaborator

gbbafna commented Aug 4, 2023

Describe the bug

For RemoteStore, once we create BlobStore , we don't close it ever and reuse it for nodes' lifetime. That means the plugin level settings and repo metadata update doesn't get applied to it .

There are two issues which we need to fix here :

  1. When we update repository, Repositories Service closes existing BlobRepository , BlobStore and opens a new one . However RemoteStore continues to use existing BlobStore which has no clue on new metadata .

  2. We never reload the BlobStoreRepository in place. This means that cluster settings update also doesn't get applied on repo.

We need to a way to update the Remote Repositories in place, so that updated settings and repo metadata is reflected .

Expected behavior
A clear and concise description of what you expected to happen.

@gbbafna gbbafna added bug Something isn't working untriaged Storage:Durability Issues and PRs related to the durability framework Storage Issues and PRs relating to data and metadata storage v2.10.0 and removed untriaged labels Aug 4, 2023
@BhumikaSaini-Amazon
Copy link
Contributor

@gbbafna I was looking at the S3 implementation. In my understanding, the following values shouldn't be reloadable because that could possibly break things in the remote store flows:

// Parse and validate the user's S3 Storage Class setting
this.bucket = BUCKET_SETTING.get(metadata.settings());
if (bucket == null) {
throw new RepositoryException(metadata.name(), "No bucket defined for s3 repository");
}
this.bufferSize = BUFFER_SIZE_SETTING.get(metadata.settings());
this.chunkSize = CHUNK_SIZE_SETTING.get(metadata.settings());
// We make sure that chunkSize is bigger or equal than/to bufferSize
if (this.chunkSize.getBytes() < bufferSize.getBytes()) {
throw new RepositoryException(
metadata.name(),
CHUNK_SIZE_SETTING.getKey()
+ " ("
+ this.chunkSize
+ ") can't be lower than "
+ BUFFER_SIZE_SETTING.getKey()
+ " ("
+ bufferSize
+ ")."
);
}
final String basePath = BASE_PATH_SETTING.get(metadata.settings());
if (Strings.hasLength(basePath)) {
this.basePath = new BlobPath().add(basePath);
} else {
this.basePath = BlobPath.cleanPath();
}
this.serverSideEncryption = SERVER_SIDE_ENCRYPTION_SETTING.get(metadata.settings());
this.storageClass = STORAGE_CLASS_SETTING.get(metadata.settings());
this.cannedACL = CANNED_ACL_SETTING.get(metadata.settings());
if (S3ClientSettings.checkDeprecatedCredentials(metadata.settings())) {
// provided repository settings
deprecationLogger.deprecate(
"s3_repository_secret_settings",
"Using s3 access/secret key from repository settings. Instead "
+ "store these in named clients and the opensearch keystore for secure settings."
);
}
logger.debug(
"using bucket [{}], chunk_size [{}], server_side_encryption [{}], buffer_size [{}], cannedACL [{}], storageClass [{}]",
bucket,
chunkSize,
serverSideEncryption,
bufferSize,
cannedACL,
storageClass
);

Is there a known use case where we want these too to be reloadable?

Thanks!

@gbbafna
Copy link
Collaborator Author

gbbafna commented Sep 22, 2023

Hi @BhumikaSaini-Amazon , Currently these are also reloadable. However we are restricting changing these for system repositories : #9839 .

For snapshot changing the path does work - it just works like snapshot repository is cleaned up and you start from scratch .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Storage:Durability Issues and PRs related to the durability framework Storage Issues and PRs relating to data and metadata storage v2.11.0 Issues and PRs related to version 2.11.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants