You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "YangSong (Code Review)" <ge...@cloudera.org> on 2019/11/25 04:56:17 UTC

[kudu-CR] [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.

YangSong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14793


Change subject: [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
......................................................................

[test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.

Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
---
M src/kudu/tserver/tablet_server-test.cc
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/93/14793/1
-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 1
Gerrit-Owner: YangSong <sy...@yeah.net>

[kudu-CR] [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14793/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14793/1//COMMIT_MSG@7
PS1, Line 7: [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
Nit: This subject is too long. Can you set a brief subject and then use the description for a longer explanation?


http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc
File src/kudu/tserver/tablet_server-test.cc:

http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc@2496
PS1, Line 2496:     if (kMaxLimit == 0) {
This would skip all when the kNumRows = 0. Instead should we make sure the lowest value generated for kNumRows is 100?



-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 1
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 25 Nov 2019 19:46:40 +0000
Gerrit-HasComments: Yes

[kudu-CR] [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, 'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc
File src/kudu/tserver/tablet_server-test.cc:

http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc@2500
PS1, Line 2500: const int kLimit = rand() % kMaxLimit + 1
As an alternative to continuing with next iteration, I think it's possible to replace this with:

  const int kLimit = kMaxLimit == 0 ? 1 : rand() % kMaxLimit  + 1;



-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 1
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 25 Nov 2019 22:48:02 +0000
Gerrit-HasComments: Yes

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "YangSong (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14793

to look at the new patch set (#2).

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................

[test] Avoid mod 0, resolve an exception like 'Floating point
exception'.

'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
Here we cannot mod 0, if 'KMaxLimit' is 0, we're not taking mod any
more, we set 'kLimit' to 0 directly.

Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
---
M src/kudu/tserver/tablet_server-test.cc
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/93/14793/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 2
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "YangSong (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14793

to look at the new patch set (#3).

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................

[test] Avoid mod 0, resolve an exception like 'Floating point exception'.

'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
Here we cannot mod 0, if 'KMaxLimit' is 0, we're not taking mod any
more, we set 'kLimit' to 0 directly.

Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
---
M src/kudu/tserver/tablet_server-test.cc
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/93/14793/3
-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 3
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................


Patch Set 3: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 3
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: YangSong <sy...@yeah.net>
Gerrit-Comment-Date: Tue, 26 Nov 2019 20:09:03 +0000
Gerrit-HasComments: No

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................


Patch Set 3: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 3
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: YangSong <sy...@yeah.net>
Gerrit-Comment-Date: Tue, 26 Nov 2019 20:08:28 +0000
Gerrit-HasComments: No

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "YangSong (Code Review)" <ge...@cloudera.org>.
YangSong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14793/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14793/1//COMMIT_MSG@7
PS1, Line 7: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
> Nit: This subject is too long. Can you set a brief subject and then use the
I try to modify it.


http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc
File src/kudu/tserver/tablet_server-test.cc:

http://gerrit.cloudera.org:8080/#/c/14793/1/src/kudu/tserver/tablet_server-test.cc@2500
PS1, Line 2500: LOG(INFO) << "Scanning with a limit of " 
> As an alternative to continuing with next iteration, I think it's possible 
OK



-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 3
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: YangSong <sy...@yeah.net>
Gerrit-Comment-Date: Tue, 26 Nov 2019 02:24:21 +0000
Gerrit-HasComments: Yes

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "YangSong (Code Review)" <ge...@cloudera.org>.
YangSong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................


Patch Set 4:

Thank you.


-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 4
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: YangSong <sy...@yeah.net>
Gerrit-Comment-Date: Wed, 27 Nov 2019 02:55:09 +0000
Gerrit-HasComments: No

[kudu-CR] [test] Avoid mod 0, resolve an exception like 'Floating point exception'.

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14793 )

Change subject: [test] Avoid mod 0, resolve an exception like 'Floating point exception'.
......................................................................

[test] Avoid mod 0, resolve an exception like 'Floating point exception'.

'kMaxLimit' may be 0, then an exception reported like 'Floating point exception'.
Here we cannot mod 0, if 'KMaxLimit' is 0, we're not taking mod any
more, we set 'kLimit' to 0 directly.

Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Reviewed-on: http://gerrit.cloudera.org:8080/14793
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Grant Henke <gr...@apache.org>
---
M src/kudu/tserver/tablet_server-test.cc
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved
  Grant Henke: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/14793
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia45372ff5e5460d220b7a3040de2e499541bf37f
Gerrit-Change-Number: 14793
Gerrit-PatchSet: 4
Gerrit-Owner: YangSong <sy...@yeah.net>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: YangSong <sy...@yeah.net>