fapifta commented on code in PR #3982:
URL: https://github.com/apache/ozone/pull/3982#discussion_r1046118037
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/DefaultCertificateClient.java:
##########
@@ -110,28 +120,35 @@ public abstract class DefaultCertificateClient implements
CertificateClient {
private long localCrlId;
private String component;
private List<String> pemEncodedCACerts = null;
- private final Lock lock;
private KeyStoresFactory serverKeyStoresFactory;
private KeyStoresFactory clientKeyStoresFactory;
+ private AtomicBoolean isRenewing = new AtomicBoolean(false);
+ private AtomicBoolean isRenewed = new AtomicBoolean(false);
Review Comment:
I see that this variable is ever significant for tests at the moment. It
would be nice if we would be able to get rid of it but as I look at the tests
it does not seem to be easy, so I can accept that we have this variable, but as
we have it there might be places later on where someone will tempted to use it.
There is one problem though with it that we should solve, it is never set to
false once it was set to true at the first renewal. Let's set it to false by
default at instantiation, and then let's leave it to true until we start a
second renewal. So I suggest to set this to false when isRenewing is set to
true, that seems to be semantically a correct behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]