3.1.4.2 Algorithm for Querying Change Information for a Participant
The inputs for this algorithm are the following:
DestinationKnowledgeSize: The size, in bytes, of the DestinationKnowledge.
DestinationKnowledge: The SYNC_KNOWLEDGE structure provided by the destination replica with which this Participant is synchronizing.
ForgottenKnowledgeSize: The size, in bytes, of the ForgottenKnowledge.
ForgottenKnowledge: The SYNC_KNOWLEDGE structure maintained by this Participant which describes the version information no longer tracked due to the deletion of tombstones from the FileItemList.
MadeWithKnowledgeSize: The size, in bytes, of the MadeWithKnowledge.
MadeWithKnowledge: The SYNC_KNOWLEDGE structure describing the version state known by this Participant when the list of changes was generated.
ChangeSetEntryList: The list of changes known by this replica that are not yet known by the destination replica.
OutputBufferSize: The maximum number of bytes to return in OutputBuffer.
IsRecoverySynchronization: A Boolean that specifies whether the session of this Participant is a recovery synchronization session.
On completion, the Participant store MUST return:
OutputBuffer: An array of bytes that returns a SYNC_CHANGE_INFORMATION structure as specified in section 2.14.
The algorithm uses the following local variables.
SYNC_CHANGE_INFORMATION structure
Integer value (initialized to 1) CurrentChangeSetEntry.
Pseudocode for the operation is as follows:
Set SyncChangeInformation.Version to 5.
Set SyncChangeInformation.Reserved1 to 0.
Set SyncChangeInformation.DestinationKnowledgeSize to DestinationKnowledgeSize.
Set SyncChangeInformation.DestinationKnowledge to DestinationKnowledge.
Set SyncChangeInformation.ForgottenKnowledgeSize to ForgottenKnowledgeSize.
Set SyncChangeInformation.ForgottenKnowledge to ForgottenKnowledge.
Set SyncChangeInformation.Reserved2 to 0.
Set SyncChangeInformation.Reserved3 to 1.
Set SyncChangeInformation.MadeWideKnowledgeSize to MadeWithKnowledgeSize.
Set SyncChangeInformation.MadeWithKnowledge to MadeWithKnowledge.
Set SyncChangeInformation.ChangeSetList.NumEntries to ChangeSetList.Count.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].ChangeDataSize to the size in bytes for the CHANGE_SET_ENTRY structure.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].ChangeDataFormat to 7.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].ReplicaGid to 16-bytes of 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].SyncGid to 24-bytes of 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].WinnerExists to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].SyncChange to 0x00010000.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].WorkEstimate to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved1 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].IsLearnedKnowledgeProjected to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved2 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved3 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved4 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved5 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0].Reserved6 to 0.
For each ChangeSetEntry in ChangeSetList:
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ChangeDataSize to the size, in bytes, for the CHANGE_SET_ENTRY structure.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[0] CurrentChangeSetEntry.ChangeDataFormat to 7.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ReplicaGid to ChangeSetEntry.ReplicaGid.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ChangeVersion.ReplicaKey to ChangeSetEntry.ChangeReplicaKey.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ChangeVersion.TickCount to ChangeSetEntry.ChangeReplicaTickCount.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].OriginalChangeVersion.ReplicaKey to ChangeSetEntry.ChangeReplicaKey.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].OriginalChangeVersion.TickCount to ChangeSetEntry.ChangeReplicaTickCount.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].CreateVersion.ReplicaKey to ChangeSetEntry.CreateReplicaKey.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].CreateVersion.TickCount to ChangeSetEntry.CreateReplicaTickCount.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].SyncGid to ChangeSetEntry.SyncGid.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].WinnerExists to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].SyncChange to 0x00000000 if this is a change or 0x00000001 if this FileItem has been deleted.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].WorkEstimate to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved1 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].IsLearnedKnowledgeProjected to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved2 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved3 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved4 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved5 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved6 to 0.
Set CurrentChangeSetEntry to CurrentChangeSetEntry + 1.
EndFor
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ChangeDataSize to the size in bytes for the CHANGE_SET_ENTRY structure.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ChangeDataFormat to 7.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].ReplicaGid to 16-bytes of 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].SyncGid to 24-bytes of 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].WinnerExists to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].SyncChange to 0x00020000.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].WorkEstimate to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved1 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].IsLearnedKnowledgeProjected to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved2 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved3 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved4 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved5 to 0.
Set SyncChangeInformation.ChangeSetList.ChangeSetEntry[CurrentChangeSetEntry].Reserved6 to 0.
Set SyncChangeInformation.RecoverySectionLength to 0 if this is not a recovery synchronization session or to 16 if this is a recovery synchronization session.
Set SyncChangeInformation.WorkEstimateForSyncSession to 0.
Set SyncChangeInformation.WorkEstimateForChangeBatch to 0.
Set SyncChangeInformation.IsLastChangeBatch to 0 if this is not the last set of changes or to 1 if this is the last set of changes.
Set SyncChangeInformation.IsRecoverySynchronization to 0 if this is not a recovery synchronization session or to 1 if this is a recovery synchronization session.
Set SyncChangeInformation.IsFiltered to 0.
Set OutputBuffer to SyncChangeInformation.