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

Update REST Client to Support Custom R/W Timeouts #4285

Merged
merged 2 commits into from
May 7, 2019

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented May 6, 2019

closes: #4263


  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry: clog add [section] [stanza] [message]

  • rereviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@alexanderbez alexanderbez added WIP T: Dev UX UX for SDK developers (i.e. how to call our code) labels May 6, 2019
@alexanderbez alexanderbez marked this pull request as ready for review May 6, 2019 23:32
@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #4285 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4285      +/-   ##
==========================================
+ Coverage    59.1%   59.11%   +<.01%     
==========================================
  Files         217      217              
  Lines       14595    14597       +2     
==========================================
+ Hits         8627     8629       +2     
  Misses       5330     5330              
  Partials      638      638

server.TrapSignal(func() {
err := rs.listener.Close()
rs.log.Error("error closing listener", "err", err)
})

cfg := rpcserver.DefaultConfig()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you dropping DefaultConfig()? Couldn't we override only the values that we want to override and fallback to the defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there is no longer a need for DefaultConfig(). Config is defined by three values which we each set manually. ie. the call would be redundant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - fair enough

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small remark, looks good otherwise

@fedekunze fedekunze requested a review from faboweb May 7, 2019 08:28
cmd.Flags().Int(FlagMaxOpenConnections, 1000, "The number of maximum open connections")
cmd.Flags().Uint(FlagMaxOpenConnections, 1000, "The number of maximum open connections")
cmd.Flags().Uint(FlagRPCReadTimeout, 10, "The RPC read timeout (in seconds)")
cmd.Flags().Uint(FlagRPCWriteTimeout, 10, "The RPC write timeout (in seconds)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the timeout in order to receive conformation that your write request was successful? Like what is a rest write?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rigelrozanski yeah, the write timeout, from the REST client pov, is mainly for broadcasting.

@alexanderbez alexanderbez merged commit 99df748 into master May 7, 2019
@alexanderbez alexanderbez deleted the bez/4263-configurable-rw-rpc-timeouts branch May 7, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST Client: Configurable R/W Timetout
3 participants