-
Notifications
You must be signed in to change notification settings - Fork 548
Fixing goavro bug due to codec state mutation #4070
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
Fixing goavro bug due to codec state mutation #4070
Conversation
I realized why this problem existed prior to 2.12 but never manifested in our code until 1.16. This is because the old code was always creating a new codec when serializing (since it had to create a FullStandardJson codec). After the 1.16 change, it was reusing the schema.Codec() which would be subject to mutation issues... For now, bringing back to old approach that always creates a new codec, which should get rid of the mutation issue altogether... Signed-off-by: Patrick Assuied <[email protected]>
Signed-off-by: Patrick Assuied <[email protected]>
JoshVanL
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers @passuied 🙂
|
As discussed on the call this is less of a workaround and more of a revert in behaviour to the old 1.15 behaviour. |
Upgrade to latest srclient library as well (small [patch](riferrei/srclient#114)) Added unit test to verify goavro error stays fixed Signed-off-by: Patrick Assuied <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.16 #4070 +/- ##
================================================
- Coverage 28.57% 28.57% -0.01%
================================================
Files 333 334 +1
Lines 42113 42175 +62
================================================
+ Hits 12034 12050 +16
- Misses 29076 29121 +45
- Partials 1003 1004 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Patrick Assuied <[email protected]>
Description
Fixing goavro bug due to codec state mutation (linkedin/goavro#299).
Also taking a more defensive approach moving forward, bringing back the old approach that always creates a new codec, which should get rid of the mutation issue altogether in the future...
Added unit test to verify it's fixed
Issue reference
#4067
linkedin/goavro#299
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.