diff --git a/hsds/datanode_lib.py b/hsds/datanode_lib.py index 7711b2f2..0dc23560 100644 --- a/hsds/datanode_lib.py +++ b/hsds/datanode_lib.py @@ -948,9 +948,7 @@ async def get_chunk_bytes( log.error(msg) raise HTTPInternalServerError() - msg = "get_chunk_bytes done for hyperchunks " - msg += f"arr min: {chunk_arr.min()}, arr_max: {chunk_arr.max()}" - log.debug(msg) + log.debug("get_chunk_bytes done for hyperchunks") return chunk_arr diff --git a/hsds/util/storUtil.py b/hsds/util/storUtil.py index 178f2ce0..47e62170 100644 --- a/hsds/util/storUtil.py +++ b/hsds/util/storUtil.py @@ -472,6 +472,10 @@ async def getStorBytes(app, log.info(f"read: {len(data)} bytes for key: {key}") if length > 0 and len(data) != length: log.warn(f"requested {length} bytes but got {len(data)} bytes") + # extend data to expected length + buffer = bytearray(length) + buffer[:(len(data))] + data = bytes(buffer) if chunk_locations: log.debug(f"getStorBytes - got {len(chunk_locations)} chunk locations") # uncompress chunks within the fetched data and store to diff --git a/tests/unit/compression_test.py b/tests/unit/compression_test.py index a387db6b..7a7cc932 100755 --- a/tests/unit/compression_test.py +++ b/tests/unit/compression_test.py @@ -53,8 +53,6 @@ def testCompression(self): self.assertEqual(data, data_copy) def testBitShuffle(self): - print("skipping bitshuffle test") - return shape = (1_000_000, ) dt = np.dtype("