Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
In KeyInputStream, when the object is initialized, it pre-creates a BlockInputStream for every block in the Key. If the key is very large, this can be a lot of streams. For the Ratis read case, the BlockInputStream objects are lightweight and they don't setup the block read until they are read for the first time. However this is not the case with the EC readers, which allocate buffers and some resources when they are allocated.
Additionally, when the KeyInputStream has read past a given block it does not close the previous stream. So even if the EC readers delayed allocation until first read, the resources will not be freed by close until after the Key has been read completely.
We should make KeyInputStream open the Block stream on demand, and close it after its read position has moved outside the current block (either by seek or normal reads).
Attachments
Attachments
Issue Links
- is related to
-
HDDS-6422 EC: Fix too many idle threads during reconstruct read.
- Resolved