4.1.10.6.16 UpdateUTDandPAS

 procedure UpdateUTDandPAS(
   msgReplyNative: DRS_MSG_GETCHGREPLY_NATIVE,
   partialAttrSetEx: PARTIAL_ATTR_VECTOR_V1_EXT,
   nc: DSName)

Informative summary of behavior: If the client has applied all replicated updates in the response message of IDL_DRSGetNCChanges from the server, and if the replication cycle is complete, then the client updates the replUpToDateVector and partialAttributeSet abstract attributes, as specified in the UpdateUTDandPAS procedure. This procedure has the following input parameters.

  • msgReplyNative: The IDL_DRSGetNCChanges response from the server.

  • partialAttrSetEx: The PARTIAL_ATTR_VECTOR_V1_EXT structure that contains attributes to be added to the partialAttributeSet abstract variable.

  • nc: The DSName of the root of the NC replica where the replicated update is applied.

      
     partialAttrSetAdd: sequence of ATTRTYP
     remoteCursor: UPTODATE_CURSOR_V2
     localCursor: ReplUpToDateVector
     newCursor: ReplUpToDateVector
     nc: DSName
     i: DWORD
     nc := msgReplyNative.pNC^
      
      
     /* Update partialAttributeSet abstract attribute. */
     if (not partialAttrSetEx.cAttrs = 0) then
       partialAttrSetAdd = AbstractPASFromConcretePAS(partialAttrSetEx)
       nc!partialAttributeSet := 
           nc!partialAttributeSet + partialAttrSetAdd
     endif
      
      
     /* Merge replUpToDateVector abstract attribute */
     for i := 0 to msgReplyNative.pUpToDateVecSrc^.cNumCursors - 1
       remoteCursor := msgReplyNative.pUpToDateVecSrc^.rgCursors[i]
       localCursor := select one v from nc!replUpToDateVector where
           (v.uuidDsa = remoteCursor.uuidDsa) 
       if (localCursor = null) then
         /* An entry for the server does not exist; add it. */
         newCursor.uuidDsa := remoteCursor.uuidDsa
         newCursor.usnHighPropUpdate := remoteCursor.usnHighPropUpdate
         newCursor.timeLastSyncSuccess := remoteCursor.timeLastSyncSuccess
         nc!replUpToDateVector := nc!replUpToDateVector + {newCursor}
       else
         /* Update existing entry for the server. */
         if (localCursor.usnHighPropUpdate < 
               remoteCursor.usnHighPropUpdate) then
           newCursor.usnHighPropUpdate := remoteCursor.usnHighPropUpdate
           newCursor.timeLastSyncSuccess := 
             remoteCursor.timeLastSyncSuccess
           newCursor.uuidDsa := remoteCursor.uuidDsa
           nc!replUpToDateVector :=
               nc!replUpToDateVector - {localCursor} + {newCursor}
         endif
       endif
     endfor
      
      
     return
    
Show: