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

Fix Azure http client leak in Azure filesystem #21982

Merged

Conversation

findepi
Copy link
Member

@findepi findepi commented May 15, 2024

Found by #21913

@findepi findepi added the no-release-notes This pull request does not require release notes entry label May 15, 2024
@cla-bot cla-bot bot added the cla-signed label May 15, 2024
@github-actions github-actions bot added the delta-lake Delta Lake connector label May 15, 2024
@findepi findepi force-pushed the findepi/fix-azure-http-client-leak-in-azure-filesystem-6d1547 branch 2 times, most recently from 7ed766d to 2fc79a0 Compare May 15, 2024 14:45
@@ -116,14 +118,18 @@ private boolean isHierarchicalNamespaceEnabled()
return fileSystemClient.getDirectoryClient("/").exists();
}
catch (RuntimeException e) {
throw new IOException("Failed to check whether hierarchical namespaces is enabled for the storage account %s and container %s".formatted(account, containerName));
throw new IOException("Failed to check whether hierarchical namespaces is enabled for the storage account %s and container %s" .formatted(account, containerName));
Copy link
Member

Choose a reason for hiding this comment

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

Extraneous space

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks! for some reason intellij reformat added this for me.
will try to reset the airbase code style.

Copy link
Member Author

Choose a reason for hiding this comment

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

i reimported airlift codestyle, but intellij still adds this space.
cc @trinodb/maintainers

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-filesystem-azure</artifactId>
<scope>runtime</scope>
Copy link
Member

Choose a reason for hiding this comment

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

Could it be just test scoped? Same for the okhttp dependency above?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is needed by tests, but also needed transitively.
we need to use runtime scope in such case, which sadly disables dep check

Comment on lines +102 to +107
.configuration(clientOptions.getConfiguration())
.connectionTimeout(clientOptions.getConnectTimeout())
.writeTimeout(clientOptions.getWriteTimeout())
.readTimeout(clientOptions.getReadTimeout())
.connectionPool(new ConnectionPool(maximumConnectionPoolSize,
clientOptions.getConnectionIdleTimeout().toMillis(), TimeUnit.MILLISECONDS)).build();
Copy link
Contributor

Choose a reason for hiding this comment

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

There may be potential for further config options in AzureFileSystemConfig
cc @anusudarsan

Copy link
Member

Choose a reason for hiding this comment

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

ya we will have test internally with defaults and see if there is a need for it

@findepi findepi force-pushed the findepi/fix-azure-http-client-leak-in-azure-filesystem-6d1547 branch from 2fc79a0 to ea712ce Compare May 16, 2024 07:23
@findepi findepi merged commit 9f0b611 into master May 16, 2024
67 checks passed
@findepi findepi deleted the findepi/fix-azure-http-client-leak-in-azure-filesystem-6d1547 branch May 16, 2024 08:21
@github-actions github-actions bot added this to the 449 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed delta-lake Delta Lake connector no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

None yet

5 participants