JiaLiangC commented on code in PR #3776:
URL: https://github.com/apache/ambari/pull/3776#discussion_r1639475232


##########
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java:
##########
@@ -4138,6 +4146,20 @@ public String getPasswordPolicyDescription() {
     return getProperty(PASSWORD_POLICY_DESCRIPTION);
   }
 
+  /**
+   * @return Password policy history count
+   */
+  public int getPasswordPolicyHistoryCount() {
+    int historyCount = 
Integer.parseInt(getProperty(PASSWORD_POLICY_HISTORY_COUNT));
+    if(historyCount < 1){
+      historyCount = 1;
+    }
+    if(historyCount > 10){
+      historyCount = 10;

Review Comment:
   It would be best to add some logging here to facilitate debugging, 
especially in cases where the value set by the user is greater than 10 but is 
not effective. Without logging, it can be quite confusing. Additionally, 
describe in the documentation that the maximum number of times is 10 for 
performance considerations.
   



-- 
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: dev-unsubscr...@ambari.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org
For additional commands, e-mail: dev-h...@ambari.apache.org

Reply via email to