PutChanges_CheckForIdReuse - Additional flags
gabor-v opened this issue · 11 comments
Hi!
I’m bit confused about putChanges additionalFlags (MS-FSSHTTPB - 2.2.2.1.4.1):
In TestCase_S13_TC20_PutChanges_CheckForIdReuse (SharedTestCase/S13_PutChanges.cs) it seems the ’C – Check for Id Reuse’ flag is connected somehow with ’D – Coherency Check Only Applied Index Entries’ flag (D is mentioned in the method comment (in row 1211) and at the end of the test method between requirements (in row 1263)).
Could you please clarify a bit more how these flags related to each other in usage and where is the D flag set in that test code?
Thank you!
@gabor-v I debugged the code and found that D flag isn't set in TC20.
Then I changed the code and set D flag to 1, it is also passed. So far, I didn't find the connection between C and D.
PutChangesCellSubRequest putChange = new PutChangesCellSubRequest(SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID(), storageIndexExGuid); cellRequest.AddSubRequest(putChange, dataElements); putChange.IsAdditionalFlagsUsed = true; putChange.CheckForIdReuse = 1; **putChange.CoherencyCheckOnlyAppliedIndexEntries = 1**;
@ChangDu2021 Thank you. Could you please clarify why does it occur in the mentioned rows? It seems conscious, because it's not just one occurrence and one of them is a requirement.
@ChangDu2021 my theory on this was that the check for the D bit under the requirements code block, i.e.:
if (SharedContext.Current.IsMsFsshttpRequirementsCaptured)
{
// Verify MS-FSSHTTPB requirement: MS-FSSHTTPB_R99049
Site.CaptureRequirementIfAreEqual<ErrorCodeType>(
ErrorCodeType.CellRequestFail,
SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponse.ErrorCode, this.Site),
"MS-FSSHTTPB",
99049,
@"[Additional Flags] When D – Coherency Check Only Applied Index Entries (1 bit) is set, the server check the index entry that is actually applied and an index entry that is not applied is not checked.");
are done because of the <20> behavior note for Sharepoint 2010:
<20> Section 2.2.2.1.4: Office 2010, SharePoint Server 2010, and SharePoint Workspace 2010 do
not support the Additional Flags structure.
But I wasn't sure about this. What do you think?
@tomjebo The code at the beginning is for behavior note
if (!Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 99108, this.Site))
{
Site.Assume.Inconclusive("Implementation does not support the Additional Flags.");
}
@ChangDu2021 Since the requirement R99049 (D bit) is derived from R99048 (C bit) with the "p" designation (partial) I suspected that it had something to do with "check for reused id" logic having to do some "coherency checking" in the handling which it looks like it does in Sharepoint. Partial indicates to me that it wouldn't be a full coherency check which is kind of what I see. However, I don't know if that's the real reason for the CaptureRequirementIfAreEqual.
@ChangDu2021 have you found any new information on why the D bit behavior is checked in TestCase_S13_TC20_PutChanges_CheckForIdReuse?
@ChangDu2021 Since the requirement R99049 (D bit) is derived from R99048 (C bit) with the "p" designation (partial) I suspected that it had something to do with "check for reused id" logic having to do some "coherency checking" in the handling which it looks like it does in Sharepoint. Partial indicates to me that it wouldn't be a full coherency check which is kind of what I see. However, I don't know if that's the real reason for the CaptureRequirementIfAreEqual.
@tomjebo I think you are right. "D – Coherency Check Only Applied Index Entries" flag is used to optimize the coherency check process by instructing the server to only perform the check on the applied index entries in the file, rather than on the entire file. Checking only these entries can reduce the time for the coherency check.
C and D serve different purposes. So, I think, below code should be removed from this test case because this test case is to test C.
// Verify MS-FSSHTTPB requirement: MS-FSSHTTPB_R99049 Site.CaptureRequirementIfAreEqual<ErrorCodeType>( ErrorCodeType.CellRequestFail, SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponse.ErrorCode, this.Site), "MS-FSSHTTPB", 99049, @"[Additional Flags] When D – Coherency Check Only Applied Index Entries (1 bit) is set, the server check the index entry that is actually applied and an index entry that is not applied is not checked.");
@gabor-v To verify my understanding about D – Coherency Check Only Applied Index Entries" flag, I did some tests to compare the test case execution time change after changing D flag to 1 or 0. Here is the result and I use a word document with 6M to test.
When CoherencyCheckOnlyAppliedIndexEntries=0, the server performs the check on the entire file, the execution time is around 0:00:23.62.
When CoherencyCheckOnlyAppliedIndexEntries=1, the server only performs the check on the applied index entries in the file, the lowst execution time is 0:00:22.9, and most of the time, it is around 0:00:23.33.
Please see my comments yesterday and let me know if you have any other questions.
@JimZhao2023 Thank you!
Will the D flag then be completely removed from this test method? So not just from the 'if' clause you mentioned, but also from the 'else' and from method comment as well?
@gabor-v Sure, thanks for your suggestion.
Thank you, I close this issue.