Skip to content

Commit 775b89a

Browse files
author
Hao Xu
committed
Avoid client side store deletion timeout.
1 parent 5dfe33b commit 775b89a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
import com.linkedin.venice.exceptions.VeniceException;
171171
import com.linkedin.venice.exceptions.VeniceHttpException;
172172
import com.linkedin.venice.exceptions.VeniceNoStoreException;
173+
import com.linkedin.venice.exceptions.VeniceTimeoutException;
173174
import com.linkedin.venice.exceptions.VeniceUnsupportedOperationException;
174175
import com.linkedin.venice.helix.HelixReadOnlyStoreConfigRepository;
175176
import com.linkedin.venice.helix.HelixReadOnlyZKSharedSchemaRepository;
@@ -729,7 +730,7 @@ private void waitingMessageToBeConsumed(String clusterName, String storeName, lo
729730
"Timed out after waiting for " + waitingTimeForConsumptionMs + "ms for admin consumption to catch up.";
730731
errMsg += " Consumed execution id: " + consumedExecutionId + ", waiting to be consumed id: " + executionId;
731732
errMsg += (lastException == null) ? "" : " Last exception: " + lastException.getMessage();
732-
throw new VeniceException(errMsg, lastException);
733+
throw new VeniceTimeoutException(errMsg, lastException);
733734
}
734735

735736
LOGGER.info("Waiting execution id: {} to be consumed, currently at: {}", executionId, consumedExecutionId);
@@ -978,8 +979,13 @@ public void deleteStore(
978979
AdminOperation message = new AdminOperation();
979980
message.operationType = AdminMessageType.DELETE_STORE.getValue();
980981
message.payloadUnion = deleteStore;
981-
982-
sendAdminMessageAndWaitForConsumed(clusterName, storeName, message);
982+
// When multiple store deletions happened in a short time range, it is possible that the store deletion message
983+
// will not be consumed in time, as previous store deletion message is still being processed.
984+
try {
985+
sendAdminMessageAndWaitForConsumed(clusterName, storeName, message);
986+
} catch (VeniceTimeoutException e) {
987+
LOGGER.warn("Encountering timeout during deleting store: {} from cluster: {}", storeName, clusterName, e);
988+
}
983989

984990
// Deleting ACL needs to be the last step in store deletion process.
985991
if (store != null) {

0 commit comments

Comments
 (0)