Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TINKERPOP-2976 Fix modification while iterating #2176

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

FlorianHockmann
Copy link
Member

https://issues.apache.org/jira/browse/TINKERPOP-2976

In rare cases users could get an InvalidOperationException if the dictionary of _serializerByType was modified while another thread in parallel iterated over the keys of this dictionary. Just creating a copy of the supported types and then iterating over that should fix this.
The problem was reported for GraphBinary, but the GraphSONWriter had the same problem so I also fixed it there.

VOTE +1

Since we are currently in code freeze, we can simply merge this after that has been lifted.

@codecov-commenter
Copy link

Codecov Report

Merging #2176 (01c6571) into 3.5-dev (1d5b509) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             3.5-dev    #2176   +/-   ##
==========================================
  Coverage      69.94%   69.95%           
- Complexity      9027     9033    +6     
==========================================
  Files            866      866           
  Lines          41068    41068           
  Branches        5476     5476           
==========================================
+ Hits           28726    28730    +4     
  Misses         10440    10440           
+ Partials        1902     1898    -4     

see 8 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vkagamlyk
Copy link
Contributor

VOTE +1

@xiazcy
Copy link
Contributor

xiazcy commented Aug 8, 2023

VOTE +1, should we have a changelog entry for this?

@FlorianHockmann
Copy link
Member Author

should we have a changelog entry for this?

Yes, you're right. This should get a changelog entry. I'll add one when I merge this.

In rare cases users could get an InvalidOperationException if the
dictionary of `_serializerByType` was modified while another thread in
parallel iterated over the keys of this dictionary.
Just creating a copy of the supported types and then iterating over that
should fix this.
The problem was reported for GraphBinary, but the GraphSONWriter had the
same problem so I also fixed it there.
@FlorianHockmann FlorianHockmann merged commit eda4ea6 into 3.5-dev Aug 9, 2023
@FlorianHockmann FlorianHockmann deleted the TINKERPOP-2976 branch August 9, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants