jdegoes/blueeyes — pull request #81 by noelwelsh (2013-01-04 19:58:52+00:00)
Title: This commit fixes three bugs in the Json <-> Chunk bijection:

1. When converting a byte chunk to JSON the entire chunk is decoded, not just the first chunk in the chain.

Let me elaborate on this because it fixes a huge oversight. A chunk is a lazy list of Array[Byte]. The old implementation would only read the first element of the list. Given the default element size is 8K, if you attempted to read in JSON off the wire that was over 8K that data would be dropped. Yes really! It happened to us in production! This is now fixed.

2. I/O is always done using UTF-8, instead of the system encoding. This allows Unicode characters to be correctly handled.

3. A non-zero timeout is used when converting between chunks and JSON. (Default is 200ms). We had timeouts in production. Now we don't.