Here's an updated patch. It'll need to be updated again after
SOLR-6530 is committed. Key things in this patch are:
1) HttpPartitionTest.testLeaderZkSessionLoss: reproduces the scenario described in this ticket
2) DistributedUpdateProcessor now checks to see if the reason for a failure is because of a leader change and if so, the request fails and an error is sent to the client
I had to add a way to pass-thru some additional context information about an error from server to client, which I'll do that work in another ticket but this patch shows the approach I'm taking.
Lastly, HttpPartitionTest continues to be a problem - I beast'd it for 10 times and it failed after 6 runs locally (sometimes fewer), so will need to get that problem resolved before committing this patch too. It consistently fails in the testRf3WithLeaderFailover but for different reasons. My thinking is that I'll break the problem test case (testRf3WithLeaderFailover) out to its own test class as the other tests in this class work well and cover a lot of important functionality.