You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Michael Ho (Code Review)" <ge...@cloudera.org> on 2017/12/13 23:28:29 UTC

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Michael Ho has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8831


Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to 0. This avoids the unnecessary overhead of scanning
for idle server connections and alleviates the user from having
to pick a random large number to make sure the connection is
always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
6 files changed, 102 insertions(+), 28 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Ho <kw...@cloudera.com>

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8831/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8831/5//COMMIT_MSG@20
PS5, Line 20: set to -1 or any negative value. This avoids the unnecessary
> I think -1 would make more sense as a special value. '0' sounds like 'keepa
Makes sense. In fact, setting it to a negative value won't be too meaningful so idle connection detection is only run when keep_alive_time_ms >= 0. Please let me know if you think otherwise.


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc
File src/kudu/rpc/rpc-test.cc:

http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@402
PS5, Line 402:   // Set up server.
> agreed with tidybot here
Some earlier version without {} gets flagged by LINT:

/home/jenkins-slave/workspace/kudu-master/0/src/kudu/rpc/rpc-test.cc:400:  Empty loop bodies should use {} or continue  [whitespace/empty_loop_body] [5]

I can switch to using an empty body. In fact, this is gone in PS6.


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@407
PS5, Line 407: nt.
> 'AlwaysKeepalive" is more accurate than 'NoTimeout' since we use the term '
Done


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@435
PS5, Line 435: 
             : // Test that outbound connections to the same server are reopen upon every RPC
             : // call when the 'rpc_reopen_outbound_connections' flag is set.
             : TEST_P(TestRpc, TestReopenOutboundConnections) {
             :   // Set the flag to enable special mode: close and reopen already established
> I'm not entirely following this test. You're trying to trigger KUDU-279, bu
The simple test you suggested is essentially line 445 - line 463 below. What I am concerned about the simple test is that we cannot really tell if the connection is still alive because the thread didn't sleep for long enough.

I was also a bit uncertain whether to keep the more complicated test. On one hand, it serves as an example which inspired this change to begin with and verifies that setting keepalive_time_ms_ = 0 will keep the connection alive and "solves" the problem. On the other hand, this seems a bit hard to follow and it may break once KUDU-279 is fixed.

I simplify this call to a synchronous RPC in the new PS and keeps the simple test around.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 19 Dec 2017 08:04:00 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to 0. This avoids the unnecessary overhead of scanning
for idle server connections and alleviates the user from having
to pick a random large number to make sure the connection is
always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
6 files changed, 104 insertions(+), 28 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to 0. This avoids the unnecessary overhead of scanning
for idle server connections and alleviates the user from having
to pick a random large number to make sure the connection is
always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
6 files changed, 105 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/8831/5
-- 
To view, visit http://gerrit.cloudera.org:8080/8831
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to -1 or any negative value. This avoids the unnecessary
overhead of scanning for idle server connections and alleviates
the user from having to pick a random large number to make sure
the connection is always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
6 files changed, 76 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/8831/6
-- 
To view, visit http://gerrit.cloudera.org:8080/8831
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to any negative value. This avoids the unnecessary
overhead of scanning for idle server connections and alleviates
the user from having to pick a random large number to make sure
the connection is always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
M src/kudu/server/server_base.cc
6 files changed, 75 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/8831/8
-- 
To view, visit http://gerrit.cloudera.org:8080/8831
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................


Patch Set 8: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 21 Dec 2017 04:48:10 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc
File src/kudu/rpc/rpc-test.cc:

http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@402
PS5, Line 402:   ASSERT_EQ(0, metrics.num_server_connections_) << "Client should have 0 server connections";
> Some earlier version without {} gets flagged by LINT:
Yea, I think it is OK with empty body inside braces {} or with 'continue;' without braces, but not happy with '{ continue; }'


http://gerrit.cloudera.org:8080/#/c/8831/7/src/kudu/server/server_base.cc
File src/kudu/server/server_base.cc:

http://gerrit.cloudera.org:8080/#/c/8831/7/src/kudu/server/server_base.cc@202
PS7, Line 202:  -1 or
I think 'any negative value' is sufficient explanation, since '-1' is just one particular example of a negative value and therefore redundant.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 19 Dec 2017 13:19:37 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................


Patch Set 5:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8831/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8831/5//COMMIT_MSG@20
PS5, Line 20: set to 0. This avoids the unnecessary overhead of scanning
I think -1 would make more sense as a special value. '0' sounds like 'keepalive disabled' which would mean that you would immediate close the connection any time there are no pending calls, no?


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc
File src/kudu/rpc/rpc-test.cc:

http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@402
PS5, Line 402:     continue;
> warning: redundant continue statement at the end of loop statement [readabi
agreed with tidybot here


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@407
PS5, Line 407: TestConnectionNoTimeout
'AlwaysKeepalive" is more accurate than 'NoTimeout' since we use the term 'timeout' to refer to call timeouts, not connection destruction


http://gerrit.cloudera.org:8080/#/c/8831/5/src/kudu/rpc/rpc-test.cc@435
PS5, Line 435:     // SlowCallback() will spin until half of the calls have been made. Sleeps between calls
             :     // to cause the single reactor thread spin for extended period of time. With a low enough
             :     // 'keepalive_time_ms_', the server connection will go idle and get disconnected while
             :     // there are pending calls in the outbound queue in the client messenger, triggering
             :     // KUDU-279. Setting 'keepalive_time_ms_' to 0 should prevent this from happening.
I'm not entirely following this test. You're trying to trigger KUDU-279, but then you say it won't happen? Is this test trying to show that, in the presence of KUDU-279, the 0-keepalive acts as a workaround to that? It seems odd to use the presence of one bug to form a unit test for a separate feature, vs a much more simple test which just makes a single call, sleeps a few seconds, and makes sure the connection is still established.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 19 Dec 2017 03:26:54 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to any negative value. This avoids the unnecessary
overhead of scanning for idle server connections and alleviates
the user from having to pick a random large number to make sure
the connection is always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Reviewed-on: http://gerrit.cloudera.org:8080/8831
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>
---
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
M src/kudu/server/server_base.cc
6 files changed, 75 insertions(+), 28 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Todd Lipcon: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 9
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to 0. This avoids the unnecessary overhead of scanning
for idle server connections and alleviates the user from having
to pick a random large number to make sure the connection is
always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.cc
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
6 files changed, 104 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/8831/4
-- 
To view, visit http://gerrit.cloudera.org:8080/8831
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] KUDU-2237: Allow idle server connection scanning to be disabled

Posted by "Michael Ho (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Todd Lipcon, 

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

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

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

Change subject: KUDU-2237: Allow idle server connection scanning to be disabled
......................................................................

KUDU-2237: Allow idle server connection scanning to be disabled

Currently, a server connection being idle for more than
FLAGS_rpc_default_keepalive_time_ms ms will be closed.
However, certain services (e.g. Impala) using KRPC may want to
keep the idle connections alive for various reasons (e.g. sheer
number of connections to re-establish,  negotiation overhead
in a secure cluster). To avoid idle connection from being
closed, one currently have to set FLAGS_rpc_default_keepalive_time_ms
to a very large value.

This change implements a cleaner solution by disabling idle
connection scanning if FLAGS_rpc_default_keepalive_time_ms is
set to -1 or any negative value. This avoids the unnecessary
overhead of scanning for idle server connections and alleviates
the user from having to pick a random large number to make sure
the connection is always kept alive.

Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
---
M src/kudu/rpc/messenger.h
M src/kudu/rpc/reactor.cc
M src/kudu/rpc/reactor.h
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
M src/kudu/server/server_base.cc
6 files changed, 75 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/31/8831/7
-- 
To view, visit http://gerrit.cloudera.org:8080/8831
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6161b9e753f05620784565a417d248acf8e7050a
Gerrit-Change-Number: 8831
Gerrit-PatchSet: 7
Gerrit-Owner: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <kw...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>