You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying issue here is the repeated initialization of filesystems triggered in SerializablePipelineOptions (#18430).
Every call to FileSystems.setDefaultPipelineOptions() will silently replace any existing previous file systems without cleaning up resources.
In the case of S3FileSystem this can leak threads if the file system was already in use.
The simple test below shows the every increasing number of threads in the system.
publicclassS3FileSystemTest {
@TestpublicvoidtestSetDefaultPipelineOptions() throwsException {
S3Optionss3Options = s3Options();
s3Options.setAwsCredentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("key", "secret")));
for (inti = 0; i < 1000; i++) {
FileSystems.setDefaultPipelineOptions(s3Options);
FileSystems.match(ImmutableList.of("s3://bucket/key*"));
System.out.println("Number of threads " + Thread.activeCount());
}
}
}
This is particularly bad with some runners, e.g. see #17645:
A normal Go Flink ValidatesRunner execution would contain the logging line from this class nearly 80,000 times, making it much more difficult to read the logs.
Issue Priority
Priority: 3 (minor)
Issue Components
Component: Python SDK
Component: Java SDK
Component: Go SDK
Component: Typescript SDK
Component: IO connector
Component: Beam examples
Component: Beam playground
Component: Beam katas
Component: Website
Component: Spark Runner
Component: Flink Runner
Component: Samza Runner
Component: Twister2 Runner
Component: Hazelcast Jet Runner
Component: Google Cloud Dataflow Runner
The text was updated successfully, but these errors were encountered:
What happened?
The underlying issue here is the repeated initialization of filesystems triggered in
SerializablePipelineOptions
(#18430).Every call to
FileSystems.setDefaultPipelineOptions()
will silently replace any existing previous file systems without cleaning up resources.In the case of
S3FileSystem
this can leak threads if the file system was already in use.The simple test below shows the every increasing number of threads in the system.
This is particularly bad with some runners, e.g. see #17645:
Issue Priority
Priority: 3 (minor)
Issue Components
The text was updated successfully, but these errors were encountered: