-
Notifications
You must be signed in to change notification settings - Fork 512
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
fixing default records size for changefeed #1034
fixing default records size for changefeed #1034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be awesome if we added a test for the r=""
case, but otherwise LGTM!
if pageSize == 0 { | ||
pageSize = notary.DefaultPageSize | ||
} | ||
} else { | ||
pageSize = notary.DefaultPageSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking stylistic nit: rather than an if/else, we just set pageSize = notary.DefaultPageSize
above the if statement. Happy to just get this in as is, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also have a test for this when testing the changefeed inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add test so don't merge yet :-)
Re. first comment, I can make that change too. Had this style drilled into me a long time ago so it's my go to. Happy to do it other ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@endophage I had the other one drilled into me. :) I don't feel particularly strongly. This is fine too. We can also do:
if r != "" {
...
}
if pageSize == 0 {
pageSize = notary.DefaultPageSize
}
(moves the extra check for outside of the if r != ""
block)
Signed-off-by: David Lawrence <[email protected]> (github: endophage)
a10871c
to
67935c4
Compare
Signed-off-by: David Lawrence [email protected] (github: endophage)