Bug fix on lease table manager

This commit is contained in:
Meher Mankikar 2023-06-20 12:14:12 -07:00
parent 23edc1b934
commit 2cfb411fea

View file

@ -49,16 +49,17 @@ public class LeaseTableManager {
if (i > 100) { if (i > 100) {
throw new RuntimeException("Failed lease table deletion"); throw new RuntimeException("Failed lease table deletion");
} }
try {
List<String> leaseTableNames = listAllLeaseTables();
log.info("All lease tables name: {}. Looking for: {}", leaseTableNames, tableName);
if (!listAllLeaseTables().contains(tableName)) { if (!listAllLeaseTables().contains(tableName)) {
log.info("Succesfully deleted the lease table {}", tableName); log.info("Succesfully deleted the lease table {}", tableName);
return; return;
} } else {
} catch (Exception e) {
try { try {
Thread.sleep(TimeUnit.SECONDS.toMillis(10)); Thread.sleep(TimeUnit.SECONDS.toMillis(10));
} catch (InterruptedException e1) { } } catch (InterruptedException e1) {}
log.info("Lease table {} is not deleted yet, exception: ", tableName, e); log.info("Lease table {} is not deleted yet, exception: ", tableName);
} }
} }
} }