Adar Dembo has posted comments on this change.

Change subject: KUDU-2124. Don't hold session lock while initializing a 
TabletCopySession
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/7985/3/src/kudu/integration-tests/tablet_copy-itest.cc
File src/kudu/integration-tests/tablet_copy-itest.cc:

Line 1643:         Status s = itest::BeginTabletCopySession(ts, tablet_id, 
"dummy-uuid", kTimeout, &resp);
Since the response isn't actually used, consider dropping it from 
BeginTabletCopySession. It can always be added later.


Line 1674:     ASSERT_LT(lat, kInjectedLatency);
This seems risky; a variable amount of latency could be added to a failure from 
load and scheduling.


http://gerrit.cloudera.org:8080/#/c/7985/3/src/kudu/tserver/tablet_copy_service-test.cc
File src/kudu/tserver/tablet_copy_service-test.cc:

Line 265:         }
If you expect some contention for a fixed amount of time, it might be useful to 
add a Sleep here rather than making it a tight loop to make the test is a 
little more CPU friendly.


http://gerrit.cloudera.org:8080/#/c/7985/3/src/kudu/tserver/tablet_copy_service.cc
File src/kudu/tserver/tablet_copy_service.cc:

PS3, Line 185:     SessionEntry* session_entry = FindOrNull(sessions_, 
session_id);
             :     // Ensure that another interleaved thread has not already 
removed the failed session.
             :     if (session_entry && session == session_entry->session) {
             :       sessions_.erase(session_id);
             :     }
Can you add to the comment to explain the identity check? I imagine it's to 
protect against another thread not only removing this session but also 
replacing it with another one.


Line 267:       // The corresponding session is already in the process of 
initializing.
Can you use RPC_RETURN_NOT_OK here?


http://gerrit.cloudera.org:8080/#/c/7985/3/src/kudu/tserver/tablet_copy_source_session.cc
File src/kudu/tserver/tablet_copy_source_session.cc:

Line 73: TAG_FLAG(tablet_copy_session_inject_latency_on_init_ms, unsafe);
Make it hidden.


Line 74: TAG_FLAG(tablet_copy_session_inject_latency_on_init_ms, runtime);
I don't see the new test changing the value of this flag at runtime; can this 
be omitted?


PS3, Line 128:     TRACE("Injecting $0ms of latency due to 
--tablet_copy_session_inject_latency_on_init_ms",
             :           FLAGS_tablet_copy_session_inject_latency_on_init_ms);
Is this useful to the tests that usei t?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If8bd295a59ade8c89fdf1853dd64c4bceca8da91
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-HasComments: Yes

Reply via email to