Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSFS | Replace ChunkFS with FileWriter #8577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romayalon
Copy link
Contributor

Explain the changes

  1. Added @guymguym's changes to Replace ChunkFS with FileWriter.
  2. Applied the existing copy changes, removed the readable resume().
  3. Replaced ChunkFS usage in other files to FileWriter usage.

Issues: Fixed #xxx / Gap #xxx

  1. Fixed NSFS | ChunkFS | Inconsistent data corruption when copying using Spark #8574

Testing Instructions:

  1. See detailed instructions in the issue.
  2. test_namespace_fs
  3. test_file_writer
  4. node /noobaa-core/src/tools/file_writer_hashing.js --hash
  5. node /noobaa-core/src/tools/file_writer_hashing.js --file
  • Doc added/updated
  • Tests added

Comment on lines +1569 to +1572
const md5_enabled =
config.NSFS_CALCULATE_MD5 ||
this.force_md5_etag ||
object_sdk?.requesting_account?.force_md5_etag;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use _is_force_md5_enabled() - it probably didn't exist when I wrote this code

Comment on lines +1583 to +1585
file_writer.on('error', err => dbg.error('namespace_fs._upload_stream: error occured on FileWriter: ', err));
file_writer.on('finish', arg => dbg.error('namespace_fs._upload_stream: finish occured on stream FileWriter: ', arg));
file_writer.on('close', arg => dbg.error('namespace_fs._upload_stream: close occured on stream FileWriter: ', arg));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these error prints attempts to debug the Transform stream issues? still needed?

Comment on lines +114 to +117
for (const buf of buffers) {
// @ts-ignore
if (buf.buffer_pool_release_callback) buf.buffer_pool_release_callback();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a special code I added to test the nodejs changes I proposed for incoming http buffer pooling.
we can remove it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NSFS | ChunkFS | Inconsistent data corruption when copying using Spark
2 participants