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

fixing default records size for changefeed #1034

Merged
merged 1 commit into from
Nov 15, 2016

Conversation

endophage
Copy link
Contributor

Signed-off-by: David Lawrence [email protected] (github: endophage)

Copy link
Contributor

@riyazdf riyazdf left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@cyli cyli left a 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
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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)
@endophage endophage merged commit ab9892b into notaryproject:hotfix/0.5.1 Nov 15, 2016
@endophage endophage deleted the default_records branch November 15, 2016 00:54
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.

3 participants