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

Eric Pugh commented on SOLR-10712:
----------------------------------

[~noble.paul] has this issue been overcome by events and is now closable?

 

I looked at UpdateRequest, and the setDocIterator looks like what I would 
expect:

{{public void setDocIterator(Iterator<SolrInputDocument> docIterator) {}}
{{{}this.docIterator = docIterator;{}}}{{{}}{}}}

 

 

 

> UpdateRequest.setDocIterator() writes the payload in memory before sending to 
> server
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-10712
>                 URL: https://issues.apache.org/jira/browse/SOLR-10712
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>            Reporter: Noble Paul
>            Priority: Major
>
> {code}
> @Override
>   public ContentStream getContentStream(final UpdateRequest request) throws 
> IOException {
>     final BAOS baos = new BAOS();
>     new JavaBinUpdateRequestCodec().marshal(request, baos);
>     
>     return new ContentStream() {
>       @Override
>       public String getName() {
>         return null;
>       }
>       @Override
>       public String getSourceInfo() {
>         return "javabin";
>       }
>       @Override
>       public String getContentType() {
>         return "application/javabin";
>       }
>       @Override
>       public Long getSize() // size if we know it, otherwise null
>       {
>         return new Long(baos.size());
>       }
>       @Override
>       public InputStream getStream() {
>         return new ByteArrayInputStream(baos.getbuf(), 0, baos.size());
>       }
>       @Override
>       public Reader getReader() {
>         throw new RuntimeException("No reader available . this is a 
> binarystream");
>       }
>     };
>   }
> {code}
> This writes everything to in memory buffer before writing it to the server. 
> This can easily cause OOM errors in the client 



--
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