Commit eacdfc49 authored by Brandon Williams's avatar Brandon Williams

Merge branch 'cassandra-3.11' into trunk

parents 7cdad3ce 4f50a671
......@@ -43,6 +43,7 @@
Merged from 3.11:
* Fix CQL formatting of read command restrictions for slow query log (CASSANDRA-15503)
Merged from 3.0:
* Catch exception on bootstrap resume and init native transport (CASSANDRA-15863)
* Fix replica-side filtering returning stale data with CL > ONE (CASSANDRA-8272, CASSANDRA-8273)
* Rely on snapshotted session infos on StreamResultFuture.maybeComplete to avoid race conditions (CASSANDRA-15667)
* EmptyType doesn't override writeValue so could attempt to write bytes when expected not to (CASSANDRA-15790)
......
......@@ -438,7 +438,8 @@ public class CassandraDaemon
public void initializeNativeTransport()
{
// Native transport
nativeTransportService = new NativeTransportService();
if (nativeTransportService == null)
nativeTransportService = new NativeTransportService();
}
@VisibleForTesting
......
......@@ -1637,20 +1637,30 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
@Override
public void onSuccess(StreamState streamState)
{
bootstrapFinished();
if(isSurveyMode)
try
{
logger.info("Startup complete, but write survey mode is active, not becoming an active ring member. Use JMX (StorageService->joinRing()) to finalize ring joining.");
bootstrapFinished();
if (isSurveyMode)
{
logger.info("Startup complete, but write survey mode is active, not becoming an active ring member. Use JMX (StorageService->joinRing()) to finalize ring joining.");
}
else
{
isSurveyMode = false;
progressSupport.progress("bootstrap", ProgressEvent.createNotification("Joining ring..."));
finishJoiningRing(true, bootstrapTokens);
}
progressSupport.progress("bootstrap", new ProgressEvent(ProgressEventType.COMPLETE, 1, 1, "Resume bootstrap complete"));
if (!isNativeTransportRunning())
daemon.initializeNativeTransport();
daemon.start();
logger.info("Resume complete");
}
else
catch(Exception e)
{
isSurveyMode = false;
progressSupport.progress("bootstrap", ProgressEvent.createNotification("Joining ring..."));
finishJoiningRing(true, bootstrapTokens);
onFailure(e);
throw e;
}
progressSupport.progress("bootstrap", new ProgressEvent(ProgressEventType.COMPLETE, 1, 1, "Resume bootstrap complete"));
daemon.start();
logger.info("Resume complete");
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment