storage_service: Move send_replication_notification to source file

This commit is contained in:
Asias He
2015-10-21 08:51:20 +08:00
parent 5453cfbab7
commit 2f86feb581
2 changed files with 24 additions and 24 deletions

View File

@@ -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

View File

@@ -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