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

goa.adapter#logit(): remove unneeded check which would make an unsafe concurrent modification #736

Merged
merged 1 commit into from Aug 22, 2016

Conversation

ghost
Copy link

@ghost ghost commented Aug 22, 2016

  • logit() doesn't need to modify a.keyvals because it was already fixed up in New()

…tion

- logit() doesn't need to modify a.keyvals because it was already fixed up in New()
@ghost ghost changed the title removed unneeded check which would make an unsafe concurrent modification goa.adapter.logit(): remove unneeded check which would make an unsafe concurrent modification Aug 22, 2016
@ghost ghost changed the title goa.adapter.logit(): remove unneeded check which would make an unsafe concurrent modification goa.adapter#logit(): remove unneeded check which would make an unsafe concurrent modification Aug 22, 2016
@raphael
Copy link
Member

raphael commented Aug 22, 2016

Thank you! could I convince you to add a test that would have failed prior to this fix?

@@ -76,9 +76,6 @@ func (a *adapter) logit(msg string, keyvals []interface{}, iserror bool) {
keyvals = append(keyvals, ErrMissingLogValue)
}
m := (len(a.keyvals) + 1) / 2
if len(a.keyvals)%2 != 0 {
a.keyvals = append(a.keyvals, ErrMissingLogValue)

This comment was marked as off-topic.

@raphael
Copy link
Member

raphael commented Aug 22, 2016

oh I misread the fix... looks great, thanks!

@raphael raphael merged commit 398e76a into goadesign:master Aug 22, 2016
ikawaha pushed a commit to ikawaha/goa that referenced this pull request Dec 13, 2016
…tion (goadesign#736)

- logit() doesn't need to modify a.keyvals because it was already fixed up in New()
raphael pushed a commit that referenced this pull request Dec 14, 2016
* Added the ability to dynamically add/remove keys from the jwt security middleware after creation. (#818)

* Refactor JWT key resolver (#832)

To introduce new "simple" resolver.

* Add an interface instead of using testing.T (#733)

* removed unneeded check which would make an unsafe concurrent modification (#736)

- logit() doesn't need to modify a.keyvals because it was already fixed up in New()

* Modify metrics so that names are normalized to legal chars (#771)

* Add normalizeKeys() function for normalizing metric key names

* Properly synchronize updates to metrics object

* Fix setting a default value to datetime

* Add tests for a default value of datetime

* address issue #738 by creating a title for the test file

* Fix a finalize test

* Revert "Refactor JWT key resolver (#832)"

This reverts commit f6ecb66.

* Revert "Added the ability to dynamically add/remove keys from the jwt security middleware after creation. (#818)"

This reverts commit 4c7fc9d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants