4.1.10.1.2 Cycle Goal

For any cycle that is not an extended operation, the goal of the server is to send updates such that at the conclusion of the cycle, the client NC replica contains all updates that were present in the server NC replica at the start of the cycle. More concretely, if cycleStartUtd is the server's msgIn.pNC^!replUpToDateVector on receipt of the first request in a cycle where msgIn.ulExtendedOp = 0, then the final response in the cycle MUST contain msgOut.pUpToDateVecSrc such that HasUpdateKnowledge(msgOut.pUpToDateVecSrc^, cycleStartUtd) = true:

 procedure HasUpdateKnowledge(
   utd1: UPTODATE_VECTOR_V2_EXT,
   utd2: UPTODATE_VECTOR_V2_EXT): boolean
 begin
   i: integer
   j: integer
  
  
   /* Return true if and only if utd1 asserts the presence of all
    * updates asserted by utd2. */
   for i := 0 to utd2.cNumCursors - 1
     j := select one k from [0 .. utd1.cNumCursors - 1] where
         utd1.rgCursors[k].uuidDsa = utd2.rgCursors[i].uuidDsa
     if j = null or utd1.rgCursors[j].usnHighPropUpdate <
         utd2.rgCursors[i].usnHighPropUpdate then
       return false
     endif
   endfor
  
  
   return true
 end HasUpdateKnowledge

The server MAY<19> advance the cycle goal on each request such that it includes updates that the server has applied since the first request in the cycle.

The cycle goal includes a cursor c for the server DC such that:

  • c.uuidDsa is the value of the invocationId attribute of the server's nTDSDSA object.

  • c.usnHighPropUpdate is the highest USN such that the server can assert that, including the updates in this response, the client has applied any update with stamp s where s.uuidOriginating = c.uuidDsa and s.usnOriginatingc.usnHighPropUpdate. If the server has originated no updates in the NC, it MAY<20> set c.usnHighPropUpdate to 0.

  • c.timeLastSyncSuccess is the time at which the server sends the final response.