Skip to content

Commit

Permalink
fix for contiguousref datasets (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey authored Sep 26, 2024
1 parent fbbb3d4 commit 440c311
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions hsds/datanode_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions hsds/util/storUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/compression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("<i4")
arr = np.random.randint(0, 200, shape, dtype=dt)
Expand Down

0 comments on commit 440c311

Please sign in to comment.