Vladislav Pyatkov created IGNITE-19993:
------------------------------------------

             Summary: Reduce sending safe time command
                 Key: IGNITE-19993
                 URL: https://issues.apache.org/jira/browse/IGNITE-19993
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladislav Pyatkov


*Motivation*
Safe time propagation is based on messages that are sent at a particular 
interval. A safe-time direct message is less expensive than a command. The 
prpouse of the algorith is reduce sending command to propage safe time.

*Implementation notes*
Send safe time command by the following rule:
{code}
If (tSend == null) {
  // Nothing was sent at this lease interval
  sendSafeTimePropagatingCommand(tCurrent)
  if (tSend < tCurrent)
    sendSafeTimePropagatingMessage(tSend, tCurrent)
} else if (tCurrent - stFreq < tSend && tCurrent - stFreq > tSuc) {
  // An operation was performed in a previous stFreq interval, but it was not a 
success
  sendSafeTimePropagatingCommand(tCurrent)
  if (tSend < tCurrent)
    sendSafeTimePropagatingMessage(tSend, tCurrent)
} else if (tCurrent - stFreq > tSend && tSend != tSuc) {
  // The last command was unsuccessful
  sendSafeTimePropagatingCommand(tCurrent)
  if (tSend < tCurrent)
    sendSafeTimePropagatingMessage(tSend, tCurrent)
} else if (tSend < tCurrent) {
  // It is not necessary to send a safe time due to the fact that is moving 
with load
  sendSafeTimePropagatingMessage(tSend, tCurrent)
}
{code}

*Difinition of done*
Safe time propagates through messages in regular load. The safe time command is 
used only in the specific cases described above.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to