vyommani commented on code in PR #668:
URL: https://github.com/apache/ranger/pull/668#discussion_r2352212260
##########
tagsync/src/main/java/org/apache/ranger/tagsync/sink/tagadmin/TagAdminRESTSink.java:
##########
@@ -181,16 +181,13 @@ public void run() {
return;
}
} else {
- // Only sleep when HA is enabled, similar to user sync
- if (TagSyncConfig.getInstance().isTagSyncHAEnabled()) {
- try {
- long sleepInterval =
TagSyncConfig.getTagSyncHAPassiveSleepInterval();
- LOG.debug("Sleeping for [{}] milliSeconds as this
server is running in passive mode", sleepInterval);
- Thread.sleep(sleepInterval);
- } catch (InterruptedException interrupted) {
- LOG.error("Interrupted..: ", interrupted);
- return;
- }
+ try {
+ long sleepInterval =
TagSyncConfig.getTagSyncHAPassiveSleepInterval();
+ LOG.debug("Sleeping for [{}] milliSeconds as this server
is running in passive mode", sleepInterval);
+ Thread.sleep(sleepInterval);
+ } catch (InterruptedException interrupted) {
Review Comment:
Catching InterruptedException resets the thread's interrupted flag. It is
always a good idea to preserve the interrupt status, please call
Thread.currentThread().interrupt();
--
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]