Skip to content

Commit

Permalink
fix new line reader to work when reads are partial and improve memory…
Browse files Browse the repository at this point in the history
… usage

Signed-off-by: Utkarsh Srivastava <[email protected]>

cleanup code

Signed-off-by: Utkarsh Srivastava <[email protected]>
Co-authored-by: Guy Margalit <[email protected]>
  • Loading branch information
tangledbytes and guymguym committed Oct 30, 2024
1 parent 0904a8a commit 60720bd
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/sdk/nsfs_glacier_backend/tapecloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class TapeCloudUtils {
throw new Error('process exited with non-zero exit code:', errcode);
}

reader = new NewlineReader(fs_context, tmp);
reader = new NewlineReader(fs_context, tmp, { warn_too_long: true });
await reader.forEach(async line => {
const failure_case = line.startsWith("Fail");
const success_case = line.startsWith("Success");
Expand Down
Loading

0 comments on commit 60720bd

Please sign in to comment.