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

Fix race in StreamFramer and truncation in api/AllocFS.Logs #4234

Merged
merged 10 commits into from
May 4, 2018
Merged

Commits on May 2, 2018

  1. Configuration menu
    Copy the full SHA
    a8e1f35 View commit details
    Browse the repository at this point in the history
  2. api: never return EOF from Logs error chan

    Closing the frames chan is the only race-free way to signal to receivers
    that all frames have been sent and no errors have occurred.
    
    If EOF is sent on error chan receivers may not receive the last frame
    (or frames since the chan is buffered) before receiving the error.
    
    Closing frames is the idiomatic way of signaling there is no more data
    to be read from a chan.
    schmichael committed May 2, 2018
    Configuration menu
    Copy the full SHA
    41f05dc View commit details
    Browse the repository at this point in the history
  3. client: reset encoders between uses

    According to go/codec's docs, Reset(...) should be called on
    Decoders/Encoders before reuse:
    
    https://godoc.org/github.com/ugorji/go/codec
    
    I could find no evidence that *not* calling Reset() caused bugs, but
    might as well do what the docs say?
    schmichael committed May 2, 2018
    Configuration menu
    Copy the full SHA
    a7c71c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    564854d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    63dad44 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cafcb89 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    aad596b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8776cf8 View commit details
    Browse the repository at this point in the history
  9. framer: fix race and remove unused error var

    In the old code `sending` in the `send()` method shared the Data slice's
    underlying backing array with its caller. Clearing StreamFrame.Data
    didn't break the reference from the sent frame to the StreamFramer's
    data slice.
    schmichael committed May 2, 2018
    Configuration menu
    Copy the full SHA
    361db26 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6858c52 View commit details
    Browse the repository at this point in the history