nvharikrishna commented on code in PR #212:
URL: https://github.com/apache/cassandra-sidecar/pull/212#discussion_r2128534136


##########
server/src/main/java/org/apache/cassandra/sidecar/config/LiveMigrationConfiguration.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.sidecar.config;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Configuration for Live Migration feature.
+ */
+public interface LiveMigrationConfiguration
+{
+
+    /**
+     * Files to be excluded from Live Migration.
+     * @return set of file exclusion patterns.
+     */
+    Set<String> filesToExclude();
+
+    /**
+     * Directories to be excluded from Live Migration.
+     * @return set of directory exclusion patterns.
+     */
+    Set<String> directoriesToExclude();
+
+    /**
+     * Map of source and destination Cassandra instances to migrate.
+     *
+     * @return Map of strings where key is the source instance name and value 
is the destination instance name.
+     */
+    Map<String, String> migrationMap();
+}

Review Comment:
   > The sidecar instances (both source and target) have access to Cassandra.
   
   Assuming that Sidecar interacts only within local instances, the destination 
will not gain access to Cassandra until the data is copied, validated, and 
Cassandra starts running. The Cassandra instance at the source needs to be shut 
down before starting the final data copy. After this point, the source sidecar 
will no longer have access to Cassandra.
   
   If Sidecar communicates with multiple Cassandra instances, the 
`driver_parameters.contact_points` list for the CQL session provider must be 
updated to include new nodes so that it can talk to new instances while the old 
nodes go down. This process needs config change and bounce before starting 
migrations to recognize the new contact points which is important if I migrate 
all nodes in the cluster or dc. Correct me if I made wrong assumptions.
   
   Having this configuration independent of Cassandra (or any other component) 
allows to do the migration even when source/partial cluster/full cluster is 
down. I feel this offers good flexibility.
   
   The concern about rolling out Sidecar to recognize migration config is valid 
(concern for me too), but I suggest approaching this by hot reloading the 
configuration instead of storing it in Cassandra as this feature involves 
changing the nodes of the cluster itself.
   
   Let me know what you think.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to