[
https://issues.apache.org/jira/browse/HBASE-21863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766436#comment-16766436
]
Sergey Shelukhin commented on HBASE-21863:
------------------------------------------
Note that deadline error is only thrown /before/ we process the request, so it
cannot by itself cause double assign.
Actually RPC layer already has a similar mechanism: {noformat}
if (call.getStartTime() > call.getDeadline()) {
RpcServer.LOG.warn("Dropping timed out call: " + call);
{noformat}
But in this case it didn't trigger for some reason, perhaps request was just on
the boundary.
Judging by the description of YouAreDeadException it was sortof intended for a
different purpose; it was to tell RS that it's already dead from lease
expiration, but doesn't know it due to timing issues on network I guess. Then
it was repurposed for killing RS for incorrect state.
So I made a separate exception cause these are separate concerns, I can inherit
either way.
W.r.t. safety margin for deadline yes, -1 is to be able to disable it if it's
somehow broken, 0 is the default which is just use the rpc timeout with an
extra buffer of 0ms. I'll improve the comment.
> narrow down the double-assignment race window
> ---------------------------------------------
>
> Key: HBASE-21863
> URL: https://issues.apache.org/jira/browse/HBASE-21863
> Project: HBase
> Issue Type: Bug
> Reporter: Sergey Shelukhin
> Assignee: Sergey Shelukhin
> Priority: Major
> Attachments: HBASE-21863.01.patch, HBASE-21863.patch
>
>
> See HBASE-21862.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)