Skip to content

Commit 5da350f

Browse files
committed
bubble exception up to caller, refactor deleteAclsForStore
1 parent ea89abb commit 5da350f

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

services/venice-controller/src/main/java/com/linkedin/venice/controller/VeniceParentHelixAdmin.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,10 @@ public void deleteStore(
10421042
clusterName,
10431043
timeoutException);
10441044
deleteAclsForStore(store, storeName);
1045+
throw timeoutException;
10451046
} catch (Exception e) {
10461047
LOGGER.info("Caught an exception when deleting store {} in cluster {}", storeName, clusterName, e);
1048+
throw e;
10471049
} finally {
10481050
releaseAdminMessageLock(clusterName, storeName);
10491051
}
@@ -1055,14 +1057,15 @@ public void deleteStore(
10551057
* @param storeName
10561058
*/
10571059
protected void deleteAclsForStore(Store store, String storeName) {
1058-
if (store != null) {
1059-
if (!store.isMigrating()) {
1060-
cleanUpAclsForStore(store.getName(), VeniceSystemStoreType.getEnabledSystemStoreTypes(store));
1061-
} else {
1062-
LOGGER.info("Store: {} is migrating! Skipping acl deletion!", storeName);
1063-
}
1064-
} else {
1060+
if (store == null) {
10651061
LOGGER.warn("Store object for {} is missing! Skipping acl deletion!", storeName);
1062+
return;
1063+
}
1064+
1065+
if (!store.isMigrating()) {
1066+
cleanUpAclsForStore(store.getName(), VeniceSystemStoreType.getEnabledSystemStoreTypes(store));
1067+
} else {
1068+
LOGGER.info("Store: {} is migrating! Skipping acl deletion!", storeName);
10661069
}
10671070
}
10681071

0 commit comments

Comments
 (0)