leventov commented on a change in pull request #6664: Fix a race in
FileSessionCredentialsProvider
URL: https://github.com/apache/incubator-druid/pull/6664#discussion_r236785184
##########
File path:
aws-common/src/main/java/org/apache/druid/common/aws/FileSessionCredentialsProvider.java
##########
@@ -24,27 +24,25 @@
import com.amazonaws.auth.AWSSessionCredentials;
import org.apache.druid.java.util.common.concurrent.Execs;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.Properties;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class FileSessionCredentialsProvider implements AWSCredentialsProvider
{
- private final String sessionCredentials;
- private volatile String sessionToken;
- private volatile String accessKey;
- private volatile String secretKey;
+ private final String sessionCredentialsFile;
+ private AWSSessionCredentials awsSessionCredentials;
Review comment:
It doesn't need to be volatile. From JMM point of view, volatile on this
field changes anything and doesn't provide any extra guarantees.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]