KnowledgeInspector gives invalid ItemRangeOverride
-
Thursday, January 03, 2013 7:25 PM
I'm running into a problem with processing SyncKnowledge using the KnowledgeInspector with sync framework v2.1.
In the SyncIdFormatGroup I've specified the ItemIdFormat as variable length, 17 or 18 bytes, as follows:
var idFormats = new SyncIdFormatGroup(); idFormats.ReplicaIdFormat.IsVariableLength = false; // fixed-length idFormats.ReplicaIdFormat.Length = 16; // [guid] idFormats.ItemIdFormat.IsVariableLength = true; // var-length idFormats.ItemIdFormat.Length = 18; // [byte][guid][byte?] idFormats.ChangeUnitIdFormat.IsVariableLength = false; // fixed length idFormats.ChangeUnitIdFormat.Length = 1; // [byte]The first byte in the ItemIdFormat is a table id, the next 16 a guid, and the last an optional byte.
I've captured SyncKnowledge from my application that results in the problem to a binary file, (and an xml file which looks correct) and created unit tests to load the SyncKnowledge and get the ItemRangeOverrides using KnowledgeInspector. The knowledge contains 101 ItemRangeOverrides, and I get the first 27 out correctly, but get an invalid ClosedUpperBound on the 28th, as shown below. The ClosedUpperBound is truncated to 16 bytes, when every other one is 18 bytes as expected.
Lower: 00, Upper: 0805a4bec04c5540bb859115c456d60211ff Lower: 0805a4bec04c5540bb859115c456d6021200, Upper: 0805abd373804b4f88bee38d3ee13ef0a8ff Lower: 0805abd373804b4f88bee38d3ee13ef0a900, Upper: 0805dba5c1fe024e49a3f3467e4abc0e5bff Lower: 0805dba5c1fe024e49a3f3467e4abc0e5c00, Upper: 0805dd8a250fdb45aba4b10b44e0eaf6feff Lower: 0805dd8a250fdb45aba4b10b44e0eaf6ff00, Upper: 0805e15d7098fa4fc08f378957925e7d4fff Lower: 0805e15d7098fa4fc08f378957925e7d5000, Upper: 080605f7610ab84c27b5603ebc2856b625ff Lower: 080605f7610ab84c27b5603ebc2856b62600, Upper: 08060d158894274d7c873f9b354f5c4adcff Lower: 08060d158894274d7c873f9b354f5c4add00, Upper: 080610be2f08f5410d8024b38f379cbca3ff Lower: 080610be2f08f5410d8024b38f379cbca400, Upper: 0806182e365a2b45f7ab9b46ce1969b250ff Lower: 0806182e365a2b45f7ab9b46ce1969b25100, Upper: 08061b576110874e7dbce5123b9c613474ff Lower: 08061b576110874e7dbce5123b9c61347500, Upper: 08061f5fc80a174970a56e5de22c47c5d7ff Lower: 08061f5fc80a174970a56e5de22c47c5d800, Upper: 0806221348a76b43029ad393307659c331ff Lower: 0806221348a76b43029ad393307659c33200, Upper: 080622fa3a7b994decb2c73765edc27da5ff Lower: 080622fa3a7b994decb2c73765edc27da600, Upper: 08062f0cd4536549808bb5a99b3e65eaddff Lower: 08062f0cd4536549808bb5a99b3e65eade00, Upper: 080631b99f06854b40899cdf638f03d1c1ff Lower: 080631b99f06854b40899cdf638f03d1c200, Upper: 080661f31c51264a2a852b0b7b5ec81db6ff Lower: 080661f31c51264a2a852b0b7b5ec81db700, Upper: 0806693fd6f81543e59989773fe6cf6412ff Lower: 0806693fd6f81543e59989773fe6cf641300, Upper: 0806780a910d8240e89ad515347e60bcd9ff Lower: 0806780a910d8240e89ad515347e60bcda00, Upper: 080684a63ac8e544be8b3103af009287c0ff Lower: 080684a63ac8e544be8b3103af009287c100, Upper: 0806850b880f9141e68397afc0975a7721ff Lower: 0806850b880f9141e68397afc0975a772200, Upper: 08068bdc21dea243f0b4c483d16893f943ff Lower: 08068bdc21dea243f0b4c483d16893f94400, Upper: 08069efe5cca95401d8d19f3bbaed52244ff Lower: 08069efe5cca95401d8d19f3bbaed5224500, Upper: 0806a78f90a34d421d9b6545de388ae27cff Lower: 0806a78f90a34d421d9b6545de388ae27d00, Upper: 0806beeff5b9ab47b8af3168ecd84c6a4dff Lower: 0806beeff5b9ab47b8af3168ecd84c6a4e00, Upper: 0806c1813a5cdb4d6da6429aca4b85cd1aff Lower: 0806c1813a5cdb4d6da6429aca4b85cd1b00, Upper: 0806d49e18449e4f668d4997ee0cbbdacfff Lower: 0806d49e18449e4f668d4997ee0cbbdad000, Upper: 0806ef2af860674d6082ca19fcc704325bff Lower: 0806ef2af860674d6082ca19fcc704325c00, Upper: 0806f880da395e484595ffdafc63ca38 ********* Expected: Upper: 0806f880da395e484595ffdafc63ca37ffff Lower: 0806f880da395e484595ffdafc63ca380000, Upper: 0806ffef9a7e0b465cb9f09a8889ee98d2ff Lower: 0806ffef9a7e0b465cb9f09a8889ee98d300, Upper: 08070254888f0448b48538deedb3ac7f7cffI am using Sync Framework v2.1.1648. I've seen a subsequent hotfix available, but it does not address this problem. I have not found any references to any problems with KnowledgeInspector in any forums. Is the source code for KnowledeInspector available anywhere?
I can make my unit test and test data available to anyone at Microsoft who can help with this issue.
I can make my unit test and test data available for anyone at Microsoft that can help with this issue.

