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 AD9BF200B8F for ; Fri, 30 Sep 2016 15:02:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AC2F8160AC4; Fri, 30 Sep 2016 13:02:22 +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 1FCCD160AE7 for ; Fri, 30 Sep 2016 15:02:21 +0200 (CEST) Received: (qmail 79588 invoked by uid 500); 30 Sep 2016 13:02:20 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 79450 invoked by uid 99); 30 Sep 2016 13:02:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2016 13:02:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7AAC32C0B05 for ; Fri, 30 Sep 2016 13:02:20 +0000 (UTC) Date: Fri, 30 Sep 2016 13:02:20 +0000 (UTC) From: "Anoop Sam John (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-16738) L1 cache caching shared memory HFile block when blocks promoted from L2 to L1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 30 Sep 2016 13:02:22 -0000 Anoop Sam John created HBASE-16738: -------------------------------------- Summary: L1 cache caching shared memory HFile block when blocks promoted from L2 to L1 Key: HBASE-16738 URL: https://issues.apache.org/jira/browse/HBASE-16738 Project: HBase Issue Type: Sub-task Affects Versions: 2.0.0 Reporter: Anoop Sam John Assignee: Anoop Sam John Fix For: 2.0.0 This is an issue when L1 and L2 cache used with combinedMode = false. See in getBlock {code} if (victimHandler != null && !repeat) { Cacheable result = victimHandler.getBlock(cacheKey, caching, repeat, updateCacheMetrics); // Promote this to L1. if (result != null && caching) { cacheBlock(cacheKey, result, /* inMemory = */ false, /* cacheData = */ true); } return result; } {code} When block is not there in L1 and have it in L2, we will return the block read from L2 and promote that block to L1 by adding it in LRUCache. But if the Block buffer is having shared memory (Off heap bucket cache for eg:) , we can not directly cache this block. The buffer memory area under this block can get cleaned up at any time. So we may get block data corruption. In such a case, we need to do a deep copy of the block (Including its buffer) and then add that to L1 cache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)