Dan Burkert 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 BeginTabl
Done


Line 1674:     ASSERT_LT(lat, kInjectedLatency);
> This seems risky; a variable amount of latency could be added to a failure 
This check is pretty critical to ensuring no regressions.  We could weaken it a 
bit, but it would correspondingly weaken the test.  I looped this 100 times to 
make sure it's not flaky, and it passed 100%.  
http://dist-test.cloudera.org/job?job_id=dan.1504897900.15603


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 usefu
I think it's valuable to have this pinging the methods as fast as possible in 
order to suss out concurrency issues.


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
Done


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


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.
Done


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 th
Done


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?
I think this is a common patter, e.g. 
https://github.com/apache/kudu/blob/master/src/kudu/tablet/transactions/write_transaction.cc#L153


-- 
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