Copilot commented on code in PR #6868:
URL: https://github.com/apache/hive/pull/6868#discussion_r4254798155


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/leader/CompactorTasks.java:
##########
@@ -110,6 +126,7 @@ public void takeLeadership(LeaderElection election) throws 
Exception {
       throw new IllegalStateException("There should be no running tasks before 
taking the leadership!");
     }
 
+    isDynamic = election.isDynamic();

Review Comment:
   The core override of the initiator/cleaner flags under dynamic election has 
no regression test. Current lease-election integration tests force both flags 
to `true`, so they do not distinguish the new behavior from the old 
implementation. Add coverage with both flags disabled under lock election, and 
retain a host-election case confirming that static election still honors them.



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/leader/HouseKeepingTasks.java:
##########
@@ -102,6 +109,7 @@ public void takeLeadership(LeaderElection election) throws 
Exception {
     ThreadFactory threadFactory = new ThreadFactoryBuilder().setDaemon(true)
         .setNameFormat("Metastore Scheduled Worker(" + election.getName() + ") 
%d").build();
     final List<MetastoreTaskThread> tasks;
+    isDynamic = election.isDynamic();

Review Comment:
   The new behavior that ignores `METASTORE_HOUSEKEEPING_THREADS_ON` for a 
lease-elected leader is not covered. The existing lease-leader integration 
setup explicitly sets this option to `true`, so it would still pass if this 
dynamic branch were removed. Please add a lock-election test with the option 
disabled that proves remote tasks start, plus a host-election case that proves 
the option is still honored.



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

Reply via email to