[ 
https://issues.apache.org/jira/browse/HIVE-25700?focusedWorklogId=682392&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-682392
 ]

ASF GitHub Bot logged work on HIVE-25700:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Nov/21 06:08
            Start Date: 17/Nov/21 06:08
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #2789:
URL: https://github.com/apache/hive/pull/2789#discussion_r750895871



##########
File path: 
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
##########
@@ -1417,10 +1426,27 @@ private void process(NotificationEvent event, 
ListenerEvent listenerEvent) throw
       setTimeToLive(MetastoreConf.getTimeVar(conf, ttlConf, TimeUnit.SECONDS));
       setCleanupInterval(
           MetastoreConf.getTimeVar(conf, 
ConfVars.EVENT_DB_LISTENER_CLEAN_INTERVAL, TimeUnit.MILLISECONDS));
+      setWaitInterval(MetastoreConf
+          .getTimeVar(conf, EVENT_DB_LISTENER_CLEAN_STARTUP_WAIT_INTERVAL, 
TimeUnit.MILLISECONDS));
     }
 
     @Override
     public void run() {
+      LOG.info("Wait interval is {}", waitInterval);
+      if (waitInterval > 0) {
+        try {
+          LOG.info("Cleaner Thread Restarted and {} or {} is configured. So 
cleaner thread will startup post waiting "
+                  + "{} ms", EVENT_DB_LISTENER_CLEAN_STARTUP_WAIT_INTERVAL,
+              EVENT_DB_LISTENER_CLEAN_STARTUP_WAIT_INTERVAL.getHiveName(), 
waitInterval);
+          Thread.sleep(waitInterval);
+        } catch (InterruptedException e) {
+          LOG.error("Failed during the initial wait before start.", e);
+          Thread.currentThread().interrupt();

Review comment:
       Wondering the use-case to interrupt the current thread. Trying to 
evaluate it against just re-throwing  "e".




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 682392)
    Time Spent: 0.5h  (was: 20m)

> Prevent deletion of Notification Events post restarts
> -----------------------------------------------------
>
>                 Key: HIVE-25700
>                 URL: https://issues.apache.org/jira/browse/HIVE-25700
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In case of DR scenarios, when Hive service goes down, Prevent deletion of 
> entries in the Notification Log immediately, Give time for ADMINs to 
> reconfigure properties to handle further Replication process.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to