Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D3102200C8B for ; Mon, 22 May 2017 13:05:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D1A45160BBF; Mon, 22 May 2017 11:05:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2322B160BA5 for ; Mon, 22 May 2017 13:05:07 +0200 (CEST) Received: (qmail 95525 invoked by uid 500); 22 May 2017 11:05:07 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 95514 invoked by uid 99); 22 May 2017 11:05:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 11:05:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C13FB1A7B7B for ; Mon, 22 May 2017 11:05:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ZQP1cAuZm1Cq for ; Mon, 22 May 2017 11:05:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 77A265FDBB for ; Mon, 22 May 2017 11:05:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D5ACDE0D77 for ; Mon, 22 May 2017 11:05:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4E12F21B5F for ; Mon, 22 May 2017 11:05:04 +0000 (UTC) Date: Mon, 22 May 2017 11:05:04 +0000 (UTC) From: "Jingyun Tian (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18059) The scanner order for memstore scanners are wrong MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 22 May 2017 11:05:09 -0000 [ https://issues.apache.org/jira/browse/HBASE-18059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16019453#comment-16019453 ] Jingyun Tian commented on HBASE-18059: -------------------------------------- [~appy] since every cell in memstore has a sequence ID, I think the problem that memstore has the same scanner order with storefile makes the order wrong seems cannot happen. Because the CellComparator will consider the sequence ID before scanner order, so I think the comparison of scanner order will not happen. In addition, is there a situation that data from bulk import could have same sequence ID with cells in memstore? > The scanner order for memstore scanners are wrong > ------------------------------------------------- > > Key: HBASE-18059 > URL: https://issues.apache.org/jira/browse/HBASE-18059 > Project: HBase > Issue Type: Bug > Components: regionserver, scan, Scanners > Affects Versions: 2.0.0 > Reporter: Duo Zhang > Assignee: Jingyun Tian > Fix For: 2.0.0 > > > This is comments for KeyValueScanner.getScannerOrder > {code:title=KeyValueScanner.java} > /** > * Get the order of this KeyValueScanner. This is only relevant for StoreFileScanners and > * MemStoreScanners (other scanners simply return 0). This is required for comparing multiple > * files to find out which one has the latest data. StoreFileScanners are ordered from 0 > * (oldest) to newest in increasing order. MemStoreScanner gets LONG.max since it always > * contains freshest data. > */ > long getScannerOrder(); > {code} > As now we may have multiple memstore scanners, I think the right way to select scanner order for memstore scanner is to ordered from Long.MAX_VALUE in decreasing order. > But in CompactingMemStore and DefaultMemStore, the scanner order for memstore scanner is also start from 0, which will be messed up with StoreFileScanners. -- This message was sent by Atlassian JIRA (v6.3.15#6346)