[
https://issues.apache.org/jira/browse/SOLR-13545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16869760#comment-16869760
]
Lucene/Solr QA commented on SOLR-13545:
---------------------------------------
| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m
0s{color} | {color:green} The patch appears to include 1 new or modified test
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 4m
8s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 3m
43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 3m
43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Release audit (RAT) {color} |
{color:green} 3m 43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Check forbidden APIs {color} |
{color:green} 3m 43s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Validate source patterns {color} |
{color:green} 3m 43s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 13m
27s{color} | {color:green} solrj in the patch passed. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 27m 5s{color} |
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | SOLR-13545 |
| JIRA Patch URL |
https://issues.apache.org/jira/secure/attachment/12972442/SOLR-13545.patch |
| Optional Tests | compile javac unit ratsources checkforbiddenapis
validatesourcepatterns |
| uname | Linux lucene2-us-west.apache.org 4.4.0-112-generic #135-Ubuntu SMP
Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | ant |
| Personality |
/home/jenkins/jenkins-slave/workspace/PreCommit-SOLR-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh
|
| git revision | master / b3e759a |
| ant | version: Apache Ant(TM) version 1.9.6 compiled on July 20 2018 |
| Default Java | LTS |
| Test Results |
https://builds.apache.org/job/PreCommit-SOLR-Build/449/testReport/ |
| modules | C: solr/solrj U: solr/solrj |
| Console output |
https://builds.apache.org/job/PreCommit-SOLR-Build/449/console |
| Powered by | Apache Yetus 0.7.0 http://yetus.apache.org |
This message was automatically generated.
> ContentStreamUpdateRequest no longer closes stream
> --------------------------------------------------
>
> Key: SOLR-13545
> URL: https://issues.apache.org/jira/browse/SOLR-13545
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrJ
> Affects Versions: 7.4, 7.5, 7.6, 7.7, 7.7.1, 7.7.2, 8.0, 8.1, 8.1.1
> Environment: Windows - file locking may not cause a visible failure
> on Linux?
> Reporter: Colvin Cowie
> Priority: Major
> Attachments: ContentStreamUpdateRequestBug.java, SOLR-13545.patch,
> SOLR-13545.patch, SOLR-13545.patch
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Since the change made in SOLR-12142 _ContentStreamUpdateRequest_ no longer
> closes the stream that it opens. Therefore if streaming a file, it cannot be
> deleted until the process exits.
>
> {code:java}
> @Override
> public RequestWriter.ContentWriter getContentWriter(String expectedType) {
> if (contentStreams == null || contentStreams.isEmpty() ||
> contentStreams.size() > 1) return null;
> ContentStream stream = contentStreams.get(0);
> return new RequestWriter.ContentWriter() {
> @Override
> public void write(OutputStream os) throws IOException {
> IOUtils.copy(stream.getStream(), os);
> }
> @Override
> public String getContentType() {
> return stream.getContentType();
> }
> };
> }
> {code}
> IOUtils.copy will not close the stream. Adding a close to the write(), is
> enough to "fix" it for the test case I've attached, e.g.
>
> {code:java}
> @Override
> public void write(OutputStream os) throws IOException {
> final InputStream innerStream = stream.getStream();
> try {
> IOUtils.copy(innerStream, os);
> } finally {
> IOUtils.closeQuietly(innerStream);
> }
> }
> {code}
>
> I don't know whether any other streaming classes have similar issues
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]