hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16460) Can't rebuild the BucketAllocator's data structures when BucketCache use FileIOEngine
Date Wed, 31 Aug 2016 06:42:20 GMT

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

Anoop Sam John commented on HBASE-16460:
----------------------------------------

Sorry did not see all the exception throw - Log warn deeply.
{code}
if (reconfigured[bucketNo]) {	
373	        if (b.sizeIndex() != bucketSizeIndex)		
374	          throw new BucketAllocatorException(		
375	              "Inconsistent allocation in bucket map;");		
376	      } else {	389	      } else {
377	        if (!b.isCompletelyFree())		
378	          throw new BucketAllocatorException("Reconfiguring bucket "		
379	              + bucketNo + " but it's already allocated; corrupt data");
{code}
These 2 instances are like safety checks. I feel we can keep the original exception throw
way only here.. Only the first 2 instances where we try to get the bucket and a slot in that,
we need to handle. It can happen, we may not a slot for a particular block (if the bucket
sizes reconfigured in btw the restart).  WDYT?

Or else am +1 for latest patch. (Just need avoid the code change in above 2 places)

> Can't rebuild the BucketAllocator's data structures when BucketCache use FileIOEngine
> -------------------------------------------------------------------------------------
>
>                 Key: HBASE-16460
>                 URL: https://issues.apache.org/jira/browse/HBASE-16460
>             Project: HBase
>          Issue Type: Bug
>          Components: BucketCache
>    Affects Versions: 2.0.0, 1.1.6, 1.3.1, 1.2.3, 0.98.22
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>         Attachments: HBASE-16460-v1.patch, HBASE-16460-v2.patch, HBASE-16460-v2.patch,
HBASE-16460-v3.patch, HBASE-16460-v4.patch, HBASE-16460.patch
>
>
> When bucket cache use FileIOEngine, it will rebuild the bucket allocator's data structures
from a persisted map. So it should first read the map from persistence file then use the map
to new a BucketAllocator. But now the code has wrong sequence in retrieveFromFile() method
of BucketCache.java.
> {code}
>       BucketAllocator allocator = new BucketAllocator(cacheCapacity, bucketSizes, backingMap,
realCacheSize);
>       backingMap = (ConcurrentHashMap<BlockCacheKey, BucketEntry>) ois.readObject();
> {code}



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

Mime
View raw message