elasticsearch/elasticsearch — pull request #4027 by javanna (2013-10-31 14:47:36+00:00)
Title: Fixed ack behaviour when no ack is expected from any node or timeout is set to 0

We now return acknowledged true when no wait is needed (mustAck always returns false), without starting the timeout thread etc. Previously it would try to timeout and hang due to a CountDown#fastForward call when the internal counter is set to 0

We now return acknowledged false without starting the timeout thread when the timeout is set 0, as starting the wait and immediately stopping the thread seems pointless.

Added coverage for ack in ClusterServiceTests and added case with timeout 0 to AckTests, which allowed to find a bug in delete mapping (fixed now!)