>From Murtadha Hubail <[email protected]>:
Murtadha Hubail has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17887 )
Change subject: [NO ISSUE][CLUS] Skip replica failure messages on cloud
deployments
......................................................................
[NO ISSUE][CLUS] Skip replica failure messages on cloud deployments
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Since internal replication is disabled on cloud deployments,
do not send replica failure messages to NCs on node failures.
Change-Id: Ided98c584f9ba7ed81683005da86da5eab4da5d1
---
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/NcLifecycleCoordinator.java
1 file changed, 27 insertions(+), 3 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/87/17887/1
diff --git
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/NcLifecycleCoordinator.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/NcLifecycleCoordinator.java
index 4135f35..a8bd062 100644
---
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/NcLifecycleCoordinator.java
+++
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/replication/NcLifecycleCoordinator.java
@@ -258,11 +258,9 @@
protected void addCloudTasks(List<INCLifecycleTask> tasks, Set<Integer>
computePartitions, boolean metadataNode,
int metadataPartitionId, boolean cleanup) {
- IApplicationContext appCtx = (IApplicationContext)
serviceContext.getApplicationContext();
- if (!appCtx.isCloudDeployment()) {
+ if (!isCloudDeployment()) {
return;
}
-
StorageComputePartitionsMap map =
clusterManager.getStorageComputeMap();
map = map == null ?
StorageComputePartitionsMap.computePartitionsMap(clusterManager) : map;
Set<Integer> storagePartitions =
map.getStoragePartitions(computePartitions);
@@ -332,6 +330,9 @@
private void notifyFailedReplica(IClusterStateManager clusterManager,
String nodeID,
InetSocketAddress replicaAddress) {
+ if (isCloudDeployment()) {
+ return;
+ }
LOGGER.info("notify replica failure of nodeId {} at {}", nodeID,
replicaAddress);
Set<String> ncs = clusterManager.getParticipantNodes(true);
ReplicaFailedMessage message =
@@ -344,4 +345,9 @@
}
}
}
+
+ private boolean isCloudDeployment() {
+ IApplicationContext appCtx = (IApplicationContext)
serviceContext.getApplicationContext();
+ return appCtx.isCloudDeployment();
+ }
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17887
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ided98c584f9ba7ed81683005da86da5eab4da5d1
Gerrit-Change-Number: 17887
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-MessageType: newchange