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

Serhiy Bzhezytskyy commented on SOLR-18351:
-------------------------------------------

I looked at doing this move+un-deprecate and found a real gap, not just 
mechanical cleanup, so flagging before writing code.

RequestWriter.ContentWriter (the new abstraction) only supports writing a 
single stream to a single OutputStream -- it has no notion of multiple named 
parts. The old ContentStream-based path is still the only way to send a 
multipart request body:

- ContentStreamUpdateRequest.getContentWriter(String) deliberately returns null 
(falling back to the deprecated getContentStreams() path) whenever more than 
one stream has been added: [permalink#L52-L53]
- HttpSolrClient.isMultipart(Collection<ContentStream>) and 
HttpJettySolrClient.fillContentStream(...) build an actual multipart body, only 
reachable via that same Collection<ContentStream> fallback: 
[permalink#L144-L151] [permalink#L696-L712]

So removing ContentStream from SolrJ's client-write path isn't just swapping 
method calls -- it either drops multi-stream/multipart upload support from the 
public SolrJ API (e.g. any caller doing more than one 
ContentStreamUpdateRequest#addContentStream/addFile), or ContentWriter needs 
real multipart support added first, which is a small feature, not a cleanup.

SOLR-18351 asks to "Remove ContentStream in favour of ContentWriter", but 
ContentStream itself is also load-bearing on the pure server-read side (used in 
~50 core-side files with no ContentWriter equivalent at all), so I'd treat 
18351 as covered by/duplicate of this ticket rather than doing it separately.

Given the multipart gap, how would you like to handle it -- drop multi-stream 
support, or add multipart to ContentWriter?  [~epugh]

AI-assisted (Claude Sonnet 5)

> Remove ContentStream 
> ---------------------
>
>                 Key: SOLR-18351
>                 URL: https://issues.apache.org/jira/browse/SOLR-18351
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Eric Pugh
>            Priority: Major
>
> Remove ContentStream in favour of ContentWriter



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