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

David Smiley commented on SOLR-3913:
------------------------------------

[PostTool|https://github.com/apache/solr/blob/1084db9477ec33cbe228f44c82e8612dc051222d/solr/core/src/java/org/apache/solr/cli/PostTool.java#L1056].
 Can use {{source.transferTo(dest);}} as we are on JDK 9+. This is really 
unrelated to this issue though... I'll submit a PR that does that everywhere

> SimplePostTool optimize does a redundant commit
> -----------------------------------------------
>
>                 Key: SOLR-3913
>                 URL: https://issues.apache.org/jira/browse/SOLR-3913
>             Project: Solr
>          Issue Type: Improvement
>          Components: scripts and tools
>            Reporter: David Smiley
>            Assignee: Eric Pugh
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> At the end of SimplePostTool.execute() there is:
> {code}
>     if (commit)   commit();
>     if (optimize) optimize();
> {code}
> Each of these calls involves a separate request to Solr.  The thing is, an 
> optimize internally commits, and so the logic should forgo committing is 
> optimize is true.
> And as an aside, I think the 1kb pipe() buffer on line 893 is too small; it 
> should be around 8kb (8192) bytes which is the same value as 
> BufferedInputStream's default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to