hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12116) Hot contention spots; writing
Date Wed, 01 Oct 2014 16:59:34 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155109#comment-14155109
] 

stack commented on HBASE-12116:
-------------------------------

Thanks for review [~anoop.hbase].  It seems highly unlikely timestamps would go in reverse
but let me fix.

On TRT, [~mbertozzi] suggests doing below to cut down on need for synchronization:

{code}
  public void includeTimestamp(final long timestamp) {
    if (maximumTimestamp == -1) {
      synchronized (this) {
        if (maximumTimestamp == -1) {
          minimumTimestamp = timestamp;
          maximumTimestamp = timestamp;
        }
      }
    } else if (minimumTimestamp > timestamp) {
      synchronized (this) {
        if (minimumTimestamp > timestamp) {
          minimumTimestamp = timestamp;
        }
      }
    }
    else if (maximumTimestamp < timestamp) {
      synchronized (this) {
        if (maximumTimestamp < timestamp) {
          maximumTimestamp = timestamp;
        }
      }
    }
    return;
  }
{code}

Let me measure it. Let me make a subissue and measure.

> Hot contention spots; writing
> -----------------------------
>
>                 Key: HBASE-12116
>                 URL: https://issues.apache.org/jira/browse/HBASE-12116
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 12116.checkForReplicas.txt, 12116.stringify.and.cache.scanner.maxsize.txt,
12116.txt, Screen Shot 2014-09-29 at 5.12.51 PM.png, Screen Shot 2014-09-30 at 10.39.34 PM.png
>
>
> Playing with flight recorder, here are some write-time contentious synchronizations/locks
(picture coming)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message