[ https://issues.apache.org/jira/browse/SOLR-6117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16700791#comment-16700791 ]
Jason Gerlowski commented on SOLR-6117: --------------------------------------- Most recent attached patch is a slight update of Shalin's. I'd hoped to add a lot more tests with this that trigger the various failure conditions, but it's hard to reproduce many of them via JUnit. Also looked at adding unit tests for ReplicationHandler directly, but it relies heavily on SolrCore, which is final which makes mocking/stubbing difficult as well. If anyone sees a way to get more coverage on this without major surgery, I'd love to hear it. The current patch makes sure that we never advertise a response as status=OK falsely, so it's just a bugfix and should be safe to include in branch_7x from a breaking-change perspective. There's a lot of other problems with the replication handler responses that would require breaking changes. Specifically: * "status" is only present on some responses. Ideally it should be present on all /replication responses so that clients can rely on it being there. * "status" is used inconsistently. Some uses give it an enum-like value that clients could key off of, others treat it like a "message" field and just give it random error messages * when errors occur, the "message" and "exception" fields are used inconsistently. Ideally if an error occurs there would always be a message, and sometimes there would also be an exception. * many of the error-cases involving argument-validation set the status field properly but return with the wrong HTTP status (200). (i.e. they should throw a SolrException). I plan on working some of these out soon in a larger commit that can be put on master. > Replication command=fetchindex always return success. > ----------------------------------------------------- > > Key: SOLR-6117 > URL: https://issues.apache.org/jira/browse/SOLR-6117 > Project: Solr > Issue Type: Bug > Components: replication (java) > Affects Versions: 4.6 > Reporter: Raintung Li > Assignee: Jason Gerlowski > Priority: Major > Attachments: SOLR-6117.patch, SOLR-6117.patch, SOLR-6117.patch, > SOLR-6117.txt > > > Replication API command=fetchindex do fetch the index. while occur the error, > still give success response. > API should return the right status, especially WAIT parameter is > true.(synchronous). -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org