[ https://issues.apache.org/jira/browse/SENTRY-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289794#comment-16289794 ]
Alexander Kolbasov commented on SENTRY-1753: -------------------------------------------- I think the reason Sentry isn't using RetryingHMSClient is coincidental - it could very well use one. On the other hand, Sentry attempts to connect to HMS every half a second anyway, so the need for retrying client is somewhat less then in other cases. Note that the stated problem is excessive logging - so I don't see any reason to fix the connection logic, instead we should fix the logging part. Coming back to your proposal: 1 Wait for initial configurable delay before first attempt What is the value of any delay other then zero? Why do you want tto delay connection attempts? This just increases startup latency when Sentry restarts after reboot. 2.) Attempt to connect to HMS, So far so good... if fail due to no service, wait configurable initial delay amount and try again. Sentry waits half a second and tries again. What's wrong with that? If fail again, exponentially increase (usually power of 2) the wait time, and try again. Why? What problem does this address? It does create a new problem - the delay in detecting HMS coming up 3.) Fail out if maximum connection attempt time reached. And then what? How would it ever recover? On the other hand, just suggesting sensible default startup and retry delays without really touching the code would mitigate the log noise issue, but has the tradeoff of potentially slowing down system startup for no reason, and still bombarding logs with errors if not configured properly. How do you guess "sensible" default startup delays? It depends on state of HMS which is completely unknown. There may be a network glitch, HMS may be restarting, overloaded, etc. > Make HMSFollower initial delay configurable > ------------------------------------------- > > Key: SENTRY-1753 > URL: https://issues.apache.org/jira/browse/SENTRY-1753 > Project: Sentry > Issue Type: Task > Components: Sentry > Affects Versions: 2.0.0 > Reporter: Na Li > Assignee: Liam Sargent > Priority: Minor > > HMSFollower initial delay affects how fast it can get notification from Hive > meta store. We are changing it from 60 seconds to 0 second. It may cause some > issue. It is better to make this value configurable, so we can adjust it > based on testing result. -- This message was sent by Atlassian JIRA (v6.4.14#64029)