[
https://issues.apache.org/jira/browse/SOLR-8453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085861#comment-15085861
]
Mark Miller commented on SOLR-8453:
-----------------------------------
Here is consumeAll from 9.2:
https://github.com/eclipse/jetty.project/blame/jetty-9.2.x/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java#L281
There are a couple possible changes that may be doing this to us:
9.3
{code}
public boolean consumeAll()
{
synchronized (_inputQ)
{
try
{
while (!isFinished())
{
Content item = nextContent();
if (item == null)
break; // Let's not bother blocking
skip(item, remaining(item));
}
return isFinished() && !isError();
}
catch (IOException e)
{
LOG.debug(e);
return false;
}
}
}
{code}
9.2
{code}
public boolean consumeAll()
{
synchronized (lock())
{
// Don't bother reading if we already know there was an error.
if (_onError != null)
return false;
try
{
while (!isFinished())
{
T item = getNextContent();
if (item == null)
_contentState.waitForContent(this);
else
consume(item, remaining(item));
}
return true;
}
catch (IOException e)
{
LOG.debug(e);
return false;
}
}
}
{code}
I would first guess it's the change of not waiting for a new entity on
item==null with _contentState.waitForContent(this) anymore. The other change
looks to be instead of just checking the error status at the start, we check it
at the end.
> Local exceptions in DistributedUpdateProcessor should not cut off an ongoing
> request.
> -------------------------------------------------------------------------------------
>
> Key: SOLR-8453
> URL: https://issues.apache.org/jira/browse/SOLR-8453
> Project: Solr
> Issue Type: Bug
> Reporter: Mark Miller
> Assignee: Mark Miller
> Attachments: SOLR-8453.patch, SOLR-8453.patch, SOLR-8453.patch,
> SOLR-8453.patch, SOLR-8453.patch, SOLR-8453.patch, SOLR-8453.patch,
> SOLR-8453_test.patch, SOLR-8453_test.patch
>
>
> The basic problem is that when we are streaming in updates via a client, an
> update can fail in a way that further updates in the request will not be
> processed, but not in a way that causes the client to stop and finish up the
> request before the server does something else with that connection.
> This seems to mean that even after the server stops processing the request,
> the concurrent update client is still in the process of sending the request.
> It seems previously, Jetty would not go after the connection very quickly
> after the server processing thread was stopped via exception, and the client
> (usually?) had time to clean up properly. But after the Jetty upgrade from
> 9.2 to 9.3, Jetty closes the connection on the server sooner than previous
> versions (?), and the client does not end up getting notified of the original
> exception at all and instead hits a connection reset exception. The result
> was random fails due to connection reset throughout our tests and one
> particular test failing consistently. Even before this update, it does not
> seem like we are acting in a safe or 'behaved' manner, but our version of
> Jetty was relaxed enough (or a bug was fixed?) for our tests to work out.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]