Improve chasm Map deserialization/serialization logic#10270
Merged
Conversation
yycptt
approved these changes
May 15, 2026
Member
yycptt
left a comment
There was a problem hiding this comment.
I think we need a support/test for the case where a node is created and then deleted in the same transaction but we performed a syncStructure in between which populates the DeletedNodes map (this happens when we process multiple pure tasks in the same transaction).
I think this issue applies to not just map node but component/data node as well. No real impact I believe, we are just deleting non-exist node. Let's see if we can first confirm the issue and if so we can try address it in a separate PR.
| fmt.Errorf("node %s", n.nodeName)) | ||
| } | ||
|
|
||
| if field.val.IsNil() || len(field.val.MapKeys()) == 0 { |
Member
There was a problem hiding this comment.
can we have a unit test for this case (not deleting newly created map)?
Contributor
Author
|
Will track node removal from DeletedNodes in a separate task |
0a595ed to
05cc96d
Compare
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.
What changed?
Improve chasm Map deserialization/serialization logic
Why?
chasm.Map should not be added to DeletedNodes if never persisted. When deserializing, it should always be initialized to avoid excessive nil checks.
How did you test it?