Skip to content

Commit

Permalink
Allow schema pull in CASSANDRA_4 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
driftx committed Dec 12, 2024
1 parent 1912a4c commit 13c3d58
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.apache.cassandra.concurrent.ExecutorPlus;
import org.apache.cassandra.concurrent.FutureTask;
import org.apache.cassandra.concurrent.ScheduledExecutors;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.Mutation;
import org.apache.cassandra.exceptions.RequestFailureReason;
import org.apache.cassandra.gms.ApplicationState;
Expand All @@ -69,6 +70,7 @@
import org.apache.cassandra.utils.NoSpamLogger;
import org.apache.cassandra.utils.Pair;
import org.apache.cassandra.utils.Simulate;
import org.apache.cassandra.utils.StorageCompatibilityMode;
import org.apache.cassandra.utils.concurrent.Future;
import org.apache.cassandra.utils.concurrent.ImmediateFuture;
import org.apache.cassandra.utils.concurrent.WaitQueue;
Expand Down Expand Up @@ -387,6 +389,11 @@ private boolean shouldPullFromEndpoint(InetAddressAndPort endpoint)

if (messagingService.versions.getRaw(endpoint) != MessagingService.current_version)
{
if (DatabaseDescriptor.getStorageCompatibilityMode() == StorageCompatibilityMode.CASSANDRA_4 && messagingService.versions.getRaw(endpoint) == MessagingService.VERSION_50)
{
logger.debug("Allowing schema pull from {} because we are in CASSANDRA_4 mode", endpoint);
return true;
}
logger.debug("Not pulling schema from {} because their schema format is incompatible", endpoint);
return false;
}
Expand Down

0 comments on commit 13c3d58

Please sign in to comment.