-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[ISSUE #5078] set default pageSize to 1000 for getting all the subscribers in other server node. #5424
Conversation
int pageNo = NumberUtils.toInt(WebUtils.required(request, "pageNo")); | ||
int pageSize = NumberUtils.toInt(WebUtils.required(request, "pageSize")); | ||
int pageNo = NumberUtils.toInt(WebUtils.optional(request, "pageNo", "1")); | ||
int pageSize = NumberUtils.toInt(WebUtils.optional(request, "pageSize", "10000")); |
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.
感觉在这里用缺省值开头太大了,这个是open api,用户可以直接使用,建议还是通过在请求时设置参数。
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.
可以,我待会换种方式,但是暂时还是建议通过大数值这种方式修复这个问题。
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.
前端传递的代码是有pageSize和pageNo的,我觉得可以暂时先透传到其他server端。
之后再修改和优化查询逻辑。
缺醒值可以有,但是必须小。
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.
那我暂时把缺省值将为1000,这个基本就是查所有了。
int pageNo = NumberUtils.toInt(WebUtils.required(request, "pageNo")); | ||
int pageSize = NumberUtils.toInt(WebUtils.required(request, "pageSize")); | ||
int pageNo = NumberUtils.toInt(WebUtils.optional(request, "pageNo", "1")); | ||
int pageSize = NumberUtils.toInt(WebUtils.optional(request, "pageSize", "10000")); |
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.
前端传递的代码是有pageSize和pageNo的,我觉得可以暂时先透传到其他server端。
之后再修改和优化查询逻辑。
缺醒值可以有,但是必须小。
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.
不传递pageNo和Size吗? 光靠默认值肯定是不行的。
好的,我待会调整一下,疏忽了这个问题。 |
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
Fixes #5078
由于每台机器的subscribers的数量都可能超过pageSize,所以暂时没有使用查本地再去查远程服务的方式。因为在做翻页的时候,必须要告诉后端已经查询了哪些机器,这样才能确认这一次查询需要查询那些机器,这样复杂度会很高,改动范围会比较大。所以暂时考虑用这种方式修复此问题。
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.