Fix property deletion corrupting the in-flight property list - #342
Open
dkorkmazturk wants to merge 1 commit into
Open
Fix property deletion corrupting the in-flight property list#342dkorkmazturk wants to merge 1 commit into
dkorkmazturk wants to merge 1 commit into
Conversation
deleteProperty rebuilt mrgfpIn by adding the property being deleted (fp) for every retained entry (fp2), so after a successful server-side delete the array held copies of the deleted property and none of the retained ones. The visible list and exit-time persistence use mRgfpall, so the corruption stayed hidden until a later reset-to-default: deleteDefaultedProperty scans mrgfpIn, and after the first reset in a session it found no existing record for subsequent properties, never telling the server to delete them. Their resets appeared to take effect locally, then reverted on the next load or sync. Add the retained entry (fp2) instead of the deleted one.
Owner
|
I think I see the bug: if mrgfpin is [fp1, fp2, fp3] and I delete fp3, I want to rebuild mrgfpin as [fp1, fp2] but I am actually rebuilding it as [fp3, fp3], but I'm not quite clear the repro steps for it to manifest itself - how do I get this incorrect array to ultimately manifest itself in a persisted flight? |
Author
|
I was able to reproduce it using these steps:
Expected: only fp1 remains set. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deleteProperty rebuilt mrgfpIn by adding the property being deleted (fp) for every retained entry (fp2), so after a successful server-side delete the array held copies of the deleted property and none of the retained ones.
The visible list and exit-time persistence use mRgfpall, so the corruption stayed hidden until a later reset-to-default: deleteDefaultedProperty scans mrgfpIn, and after the first reset in a session it found no existing record for subsequent properties, never telling the server to delete them. Their resets appeared to take effect locally, then reverted on the next load or sync.
Add the retained entry (fp2) instead of the deleted one.