TheClimateCorporation/mandoline-dynamodb — pull request #5 by aykuznetsova (2014-11-22 01:33:26+00:00)
Title: Fix read-chunk in DynamoDBChunkStore

read-a-chunk used to return an empty map, not `nil`, when chunks were not found. As a result, the strongly
consistent read would never be executed, and `(:v {}) => nil` would be returned and NullPointerExceptions of the kind

Caused by: java.lang.NullPointerException
at ucar.ma2.Array.factory(Array.java:726)
at io.mandoline.impl$bytes_to_array.invoke(impl.clj:188)
at io.mandoline.impl$hash__GT_slab.invoke(impl.clj:193)
at io.mandoline.impl$get_base_chunk.invoke(impl.clj:212)
at io.mandoline.impl$update_chunk_BANG_.invoke(impl.clj:224)
at io.mandoline.impl$write_variable$update_fn__7303.invoke(impl.clj:265)
...

would follow.

This commit fixes the return value of read-a-chunk and adds a simple
unit test.