Skip to content
Snippets Groups Projects
  1. Jul 08, 2021
  2. Jul 07, 2021
  3. Jun 24, 2021
  4. Jun 23, 2021
  5. Jun 19, 2021
    • Cecylia Bocovich's avatar
      Store net.Addr in clientIDAddrMap · 6634f2be
      Cecylia Bocovich authored
      This fixes a stats collection bug where we were converting client
      addresses between a string and net.Addr using the clientAddr function
      multiple times, resulting in an empty string for all addresses.
      6634f2be
  6. Jun 14, 2021
    • sbs's avatar
      fix(client/snowflake.go): prevent wg.Add race condition · aefabe68
      sbs authored
      In VSCode, the staticcheck tool emits this warning:
      
      > should call wg.Add(1) before starting the goroutine to
      > avoid a race (SA2000)go-staticcheck
      
      To avoid this warning, just move wg.Add outside.
      aefabe68
  7. Jun 07, 2021
  8. Jun 02, 2021
  9. May 24, 2021
    • David Fifield's avatar
      Release resources in client Transport.Dial on error. · ae7cc478
      David Fifield authored
      Make a stack of cleanup functions to run (as with defer), but clear the
      stack before returning if no error occurs.
      
      Uselessly pushing the stream.Close() cleanup just before clearing the
      stack is an intentional safeguard, for in case additional operations are
      added before the return in the future.
      
      Fixes #40042.
      ae7cc478
    • David Fifield's avatar
      Fix error handling around transport.Dial. · 01a96c7d
      David Fifield authored
      The code checked for and displayed an error, but would then go on to
      call copyLoop on the nil Conn returned from transport.Dial. Add a return
      in that case, and put the cleanup operations in defer. Also remove an
      obsolete comment about an empty address. Obsolete because:
      !31 (comment 2733279)
      01a96c7d
  10. May 21, 2021
  11. May 20, 2021
    • Arlo Breault's avatar
      Remove sync.Once from around logMetrics · 7ef49272
      Arlo Breault authored
      Follow up to 160ae2dd
      
      Analysis by @dcf,
      
      > I don't think the sync.Once around logMetrics is necessary anymore.
      Its original purpose was to inhibit logging on later file handles of
      metrics.log, if there were more than one opened. See 171c55a9 and #29734
      (comment 2593039) "Making a singleton *Metrics variable causes problems
      with how Convey does tests. It shouldn't be called more than once, but
      for now I'm using sync.Once on the logging at least so it's explicit."
      Commit ba4fe1a7 changed it so that metrics.log is opened in main, used
      to create a *log.Logger, and that same instance of *log.Logger is passed
      to both NewMetrics and NewBrokerContext. It's safe to share the same
      *log.Logger across multiple BrokerContext.
      7ef49272
  12. May 19, 2021
    • Arlo Breault's avatar
      Make promMetrics not a global · 160ae2dd
      Arlo Breault authored
      Doesn't seem like it needs to exist outside of the metrics struct.
      
      Also, the call to logMetrics is moved to the constructor.  A metrics
      instance is only created when a BrokerContext is created, which only
      happens at startup.  The sync of only doing that once is left for
      documentation purposes, since it doesn't hurt, but also seems redundant.
      160ae2dd
  13. May 12, 2021
  14. Apr 26, 2021
  15. Apr 22, 2021
  16. Apr 01, 2021
  17. Mar 25, 2021
  18. Mar 19, 2021
  19. Mar 06, 2021
  20. Feb 02, 2021
Loading