comnetwork commented on a change in pull request #3947:
URL: https://github.com/apache/hbase/pull/3947#discussion_r770194776



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ChunkCreator.java
##########
@@ -134,51 +134,36 @@ public static ChunkCreator getInstance() {
     return instance;
   }
 
-  /**
-   * Creates and inits a chunk. The default implementation for a specific 
chunk size.
-   * @return the chunk that was initialized
-   */
-  Chunk getChunk(ChunkType chunkType) {
-    return getChunk(CompactingMemStore.IndexType.ARRAY_MAP, chunkType);

Review comment:
       @Apache9 , yes,this method could lead to pass in `IndexType.ARRAY_MAP` 
to the `ChunkCreator.createChunk` method finally, but fortunately, in current 
code path , `MemStoreLABImpl` in fact not call this `getChunk(ChunkType)` to 
allocate not-pooled data chunk for `IndexType.CHUNK_MAP`,so not cause serious 
bug now.
   
   This PR is not a bug fix, but an improvement to remove the high-risked 
methods and remove the unnecessary `IndexType` from `ChunkCreator` to make the 
code more simpler. Because the `IndexType` of `MemStoreLABImpl` could only be  
`IndexType.CHUNK_MAP` ,and `chunk` could only be acquired from `ChunkCreator` 
through `MemStoreLABImpl`, so the code behavior before this PR is the same as 
after the PR. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to