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

Make Read/Write Buffer Size configurable #9

Merged
merged 7 commits into from
Dec 13, 2019

Conversation

weinbergm
Copy link

We came across an issue when using Gremtune with Neptune in that if the query sent to Neptune is larger than 8K (the hard coded buffer size value in gremtune), the request is split into multiple websocket frames and Neptune doesn't seem to support that. It tries processing the part of the query in the first frame and fails. This PR is to make the buffer size configurable, so we can specifically increase the write buffer size to fit our query length.

@@ -50,8 +52,8 @@ type auth struct {

func (ws *Ws) connect() (err error) {
d := websocket.Dialer{
WriteBufferSize: 8192,
ReadBufferSize: 8192,
WriteBufferSize: ws.writeBufSize,
Copy link
Owner

Choose a reason for hiding this comment

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

is there a way to have them still default to 8192? Otherwise I think this is good.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, added defaults of 8192

@schwartzmx schwartzmx merged commit 4953989 into schwartzmx:master Dec 13, 2019
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