coreos/etcd — pull request #503 by nabeken (2014-01-23 02:00:11+00:00)
Title: fix(mod/lock) Fix two issues found in the heavily loaded tests

I found two issues in lock module in the heavily loaded tests.

In a certain situation a goroutine launched in watch() attempts to send a message to closed channel. Fixed in 4c2942f

It seems that a 'ModifiedIndex' in a lock directory is not incremented once the directory initialized. If (latest index - the ModifiedIndex) > 1000 and prevIndex exists at the time, etcd always returns 401 EcodeEventIndexCleared and a request has been never queued until no prevIndex found. I tried to fix in 1273875 but I'm not sure this is correct.