I'm sure there are plenty of more important patches out there, but I'd be interested to know if anyone has feedback on my patch.
To summarize the patch, I catch any exception, serialize it, toss it in the maps with a special key (there seem to be a couple of those already). Then I check for the presence of an exception on the other end, and deserialize/throw rather than adding to the TreeSet when I find an exception. This is nice since if you are running the code from your IDE while developing, it shows up in the local output, and the stack trace becomes clickable (if your ide does that). In normal production use, it will allow the exception to show up in the logs for the client that made the request rather than showing up in the log of one of the N nodes in the cluster. One could event catch and handle different exceptions from the worker nodes differently. It does however leave the client with an incomplete set of tuples, so perhaps those should be cleared when an exception is found, or perhaps there should be best-effort & fail-fast modes, with best-effort collecting a list of exceptions instead?
An additional enhancement might be to find a way to identify the node on which this exception occurred and wrap the original exception in an exception with the node identity information added to the message before serializing it, but I thought of that after I submitted the patch and haven't actually gone back to attempt it yet.