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

Gregory Chanan commented on SOLR-5714:
--------------------------------------

It's not clear this would cause any bugs, but the handling of creating the 
blockCache is unclear.

The assignment:
{code}        blockCache = createBlockCache(numberOfBlocksPerBank, blockSize, 
bankCount,directAllocation, slabSize, bufferSize, bufferCount);
{code}

has no effect because the (static) blockCache is actually set in 
createBlockCache, independent of whether this is static or not:
{code}blockCache = new BlockCache(metrics, directAllocation, totalMemory, 
slabSize, blockSize);
{code}

Probably should make the blockCache in createBlockCache a local variable to the 
function, not sharing a name with the static version.
Same here, it would be better to rename:
{code}
BlockCache blockCache = getBlockDirectoryCache
{code}

> You should be able to use one pool of memory for multiple collection's HDFS 
> block caches.
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-5714
>                 URL: https://issues.apache.org/jira/browse/SOLR-5714
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 4.8, 5.0
>
>         Attachments: SOLR-5714.patch, SOLR-5714.patch
>
>
> Currently, you have to specify how much direct memory to allocate per 
> SolrCore. This can be inefficient, and has some negative consequences - for 
> instance, when replicating, many times two HDFS directories will exist for 
> the same index briefly, which will double the RAM used for that SolrCore.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to