Loading ...
Sorry, an error occurred while loading the content.

Re: BijectionChunkJson fix

Expand Messages
  • Noel Welsh
    I ve just published snapshots (a week late). This time I cross built for 2.9.1 and 2.9.2. Does anyone want builds for other Scala versions? N.
    Message 1 of 4 , Jan 15, 2013
    • 0 Attachment
      I've just published snapshots (a week late). This time I cross built for 2.9.1 and 2.9.2. Does anyone want builds for other Scala versions?

      N.


      On Fri, Jan 4, 2013 at 8:03 PM, Noel Welsh <noelwelsh@...> wrote:
      Hi all,

      I've just applied a fix to the 0.6.x branch for a huge oversight in the BijectionChunkJson implementation. I don't normally post about every little thing I do but this is quite important if you use JSON heavily and it might have implications for 1.0 development if bijections still exist in some form there.

      I'll release a snapshot early next week, and email the list when it's out. This snapshot release will also include the shutdown hook fix contributed by Niel Drummond and described here:


      Here's what I've done:

      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.

      Regards,

      Noel


    Your message has been successfully submitted and would be delivered to recipients shortly.