solr-bench icon indicating copy to clipboard operation
solr-bench copied to clipboard

UploadDocs failure should throw an Exception

Open nginthfs opened this issue 1 year ago • 5 comments

Currently, when UploadDocs fails, we just log the error and go on with the test. This can throw off test results when comparing among Solr setups, since both setups may end up with more/less docs in their collections. To fix this, I think UploadDocs should throw an Exception if it receives a non-200 status code, or at least "fatal" status codes such as 404. Then, callers should handle this by ending the test preemptively (we may not have to change the callers' code, not sure!).

See: https://github.com/fullstorydev/solr-bench/blob/f8e2567293ff530f2dbf81da9aa57ba4292e2470/src/main/java/org/apache/solr/benchmarks/indexing/UploadDocs.java#L102

nginthfs avatar Jan 08 '24 18:01 nginthfs

@nginthfs is there any retry for that?

hiteshk25 avatar Jan 08 '24 18:01 hiteshk25

I don't believe that there is. I think what happens now is that the doc gets thrown away and the indexing benchmark continues on.

nginthfs avatar Jan 08 '24 19:01 nginthfs

I know sometimes there could be bad fields in some docs that caused indexing failure, tho that one is not 404, probably 500 i think

patsonluk avatar Jan 09 '24 18:01 patsonluk

Yeah 500s should probably also fail the task, so we can identify the issue and fix it. The only thing that shouldn't fail the task IMO are timeouts or 429s, which should be retried (although retries are a bigger issue than this, maybe we could add that on as a follow up issue).

nginthfs avatar Jan 09 '24 18:01 nginthfs

I think bad fields (or extra fields) cause 400 (bad request). 404 is special case of non existent collection and can be dealt with as a special case.

On Tue, 9 Jan, 2024, 11:36 pm Nick Ginther, @.***> wrote:

Yeah 500s should probably also fail the task, so we can identify the issue and fix it. The only thing that shouldn't fail the task IMO are timeouts or 429s, which should be retried (although retries are a bigger issue than this, maybe we could add that on as a follow up issue).

— Reply to this email directly, view it on GitHub https://github.com/fullstorydev/solr-bench/issues/87#issuecomment-1883542332, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDCR5A7YC4VAAIAWMY4JITYNWBLTAVCNFSM6AAAAABBR5L5CGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTGU2DEMZTGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

chatman avatar Jan 09 '24 18:01 chatman