mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 16:33:35 +00:00
storage_service: Move send_replication_notification to source file
This commit is contained in:
@@ -1889,4 +1889,27 @@ void storage_service::excise(std::unordered_set<token> tokens, inet_address endp
|
||||
excise(tokens, endpoint);
|
||||
}
|
||||
|
||||
void storage_service::send_replication_notification(inet_address remote) {
|
||||
#if 0
|
||||
// notify the remote token
|
||||
MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED);
|
||||
IFailureDetector failureDetector = FailureDetector.instance;
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Notifying {} of replication completion\n", remote);
|
||||
while (failureDetector.isAlive(remote))
|
||||
{
|
||||
AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote);
|
||||
try
|
||||
{
|
||||
iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS);
|
||||
return; // done
|
||||
}
|
||||
catch(TimeoutException e)
|
||||
{
|
||||
// try again
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace service
|
||||
|
||||
@@ -814,30 +814,7 @@ private:
|
||||
*
|
||||
* @param remote node to send notification to
|
||||
*/
|
||||
void send_replication_notification(inet_address remote) {
|
||||
#if 0
|
||||
// notify the remote token
|
||||
MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED);
|
||||
IFailureDetector failureDetector = FailureDetector.instance;
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Notifying {} of replication completion\n", remote);
|
||||
while (failureDetector.isAlive(remote))
|
||||
{
|
||||
AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote);
|
||||
try
|
||||
{
|
||||
iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS);
|
||||
return; // done
|
||||
}
|
||||
catch(TimeoutException e)
|
||||
{
|
||||
// try again
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
void send_replication_notification(inet_address remote);
|
||||
/**
|
||||
* Called when an endpoint is removed from the ring. This function checks
|
||||
* whether this node becomes responsible for new ranges as a
|
||||
|
||||
Reference in New Issue
Block a user