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

Ted Yu commented on ACCUMULO-1633:
----------------------------------

If maxMem is 0, addMutation() would be stuck in this loop:
{code}
    while ((totalMemUsed >= maxMem || flushing) && !somethingFailed) {
      waitRTE();
    }
{code}
Checking against minimum, mentioned by Josh above, should alleviate the issue:
{code}
  public BatchWriterConfig setMaxMemory(long maxMemory) {
    if (maxMemory < 0)
{code}
                
> BatchWriter and variants don't assert maxMemory as a positive, non-zero value
> -----------------------------------------------------------------------------
>
>                 Key: ACCUMULO-1633
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1633
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 1.4.3
>            Reporter: Josh Elser
>              Labels: newbie
>             Fix For: 1.4.5
>
>
> I inadvertently provided 0l to the maxMemory argument to create a BatchWriter 
> and my code immediately sat idle.
> Once I figured out my problem, I was surprised that no validation was applied 
> to the value. This can cause a BatchWriter to sit indefinitely as it waits 
> trying to "free memory". It would be good to have a "reasonable" minimum 
> (1KB?) to the BatchWriter/BatchDeleter/MultiTableBatchWriter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to