nick-boss-tech commented on PR #4829: URL: https://github.com/apache/solr/pull/4829#issuecomment-5920255594
🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)* A narrow fix can keep the transport classification at the LB boundary while preventing Cloud from replaying a partially successful direct update: ```java final boolean wasCommError = getHttpClient().wasCommError(exc); final boolean mayReplay = request.getRequestType() != UPDATE; ``` The `RouteException`/503 guard should likewise not make an `UPDATE` replayable merely because `wasRequestUnsent(exc)` is true. That status applies to one route, not necessarily every route in the direct update. The regression should route two atomic increments to different shards, let the first request succeed and have the second throw `RequestNotSentException`, then assert that the client made exactly two requests: ```java expectThrows(RouteException.class, () -> cloudClient.request(update, collection)); assertEquals(2, requestCount.get()); ``` A whole-request retry would make four requests and can apply the first shard's `inc` twice. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
