File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ final AmazonS3Reference client(RepositoryMetadata repositoryMetadata) {
312312 return existing ;
313313 }
314314 if (closed .get ()) {
315- // Not adding a new client once the manager is closed since there won't be anything to close it
315+ // Not adding a new client once the clients holder is closed since there won't be anything to close it
316316 throw new IllegalStateException ("Project [" + projectId () + "] clients holder is closed" );
317317 }
318318 if (managerClosed .get ()) {
@@ -321,15 +321,15 @@ final AmazonS3Reference client(RepositoryMetadata repositoryMetadata) {
321321 throw new IllegalStateException ("s3 clients manager is closed" );
322322 }
323323 // The close() method maybe called after we checked it, it is ok since we are already inside the synchronized block.
324- // The clearCache() will clear the newly added client.
324+ // The close method calls clearCache() which will clear the newly added client.
325325 final var newClientReference = clientBuilder .apply (settings );
326326 clientsCache = Maps .copyMapWithAddedEntry (clientsCache , clientKey , newClientReference );
327327 return newClientReference ;
328328 }
329329 }
330330
331331 /**
332- * Clear the cache by closing and clear out all clients. Subsequent {@link #client(RepositoryMetadata)} calls will recreate
332+ * Clear the cache by closing and clearing out all clients. Subsequent {@link #client(RepositoryMetadata)} calls will recreate
333333 * the clients and populate the cache again.
334334 */
335335 final synchronized void clearCache () {
You can’t perform that action at this time.
0 commit comments