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

Report current file size during writes #384

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

monthonk
Copy link
Contributor

Description of change

Mountpoint currently reports file size as 0 until the upload is complete. In this commit, we instead report how many bytes have been streamed to S3 as some applications want to know current size of the file during writes.

Does this change impact existing behavior?

Yes, uncommitted file size will be displayed as total streamed bytes instead of 0.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:18 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:18 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:18 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:18 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:24 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:24 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:24 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:24 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:43 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:43 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:43 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 17, 2023 12:43 — with GitHub Actions Inactive
@monthonk monthonk added the performance PRs to run benchmarks on label Jul 17, 2023
@monthonk monthonk temporarily deployed to PR benchmarks July 17, 2023 13:20 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR benchmarks July 17, 2023 13:20 — with GitHub Actions Inactive
@@ -960,6 +960,11 @@ impl Inode {
*lookup_count
}

pub fn inc_file_size(&self, len: usize) {
let mut state = self.inner.sync.write().unwrap();
state.stat.update_size(len);
Copy link
Member

Choose a reason for hiding this comment

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

Don't think this needs to be a method if it only has one caller

Suggested change
state.stat.update_size(len);
state.stat.size += len;

@monthonk monthonk temporarily deployed to PR benchmarks July 17, 2023 21:27 — with GitHub Actions Inactive
@monthonk monthonk had a problem deploying to PR integration tests July 17, 2023 21:27 — with GitHub Actions Failure
@monthonk monthonk had a problem deploying to PR integration tests July 17, 2023 21:27 — with GitHub Actions Failure
@monthonk monthonk had a problem deploying to PR integration tests July 17, 2023 21:27 — with GitHub Actions Failure
@monthonk monthonk temporarily deployed to PR benchmarks July 17, 2023 21:27 — with GitHub Actions Inactive
@monthonk monthonk had a problem deploying to PR integration tests July 17, 2023 21:27 — with GitHub Actions Failure
Mountpoint currently reports file size as 0 until the upload is complete.
In this commit, we instead report how many bytes have been streamed to S3
as some applications want to know current size of the file during writes.

Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
@monthonk monthonk temporarily deployed to PR integration tests July 18, 2023 09:32 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR benchmarks July 18, 2023 09:32 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR benchmarks July 18, 2023 09:32 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 18, 2023 09:32 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 18, 2023 09:32 — with GitHub Actions Inactive
@monthonk monthonk temporarily deployed to PR integration tests July 18, 2023 09:32 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt merged commit d0ef0b9 into awslabs:main Jul 18, 2023
17 checks passed
passaro added a commit to passaro/mountpoint-s3 that referenced this pull request Nov 30, 2023
Submodule mountpoint-s3-crt-sys/crt/aws-c-s3 dc90010..de36fee:
  > Bypass for CreateSession reqeust (awslabs#384)
  > Mem limiter validation (awslabs#385)
  > Fix tests to use net_test_case (awslabs#383)

Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
github-merge-queue bot pushed a commit that referenced this pull request Nov 30, 2023
* Update CRT submodules to latest releases (aws-c-s3 0.4.3)

Submodule mountpoint-s3-crt-sys/crt/aws-c-s3 dc90010..de36fee:
  > Bypass for CreateSession reqeust (#384)
  > Mem limiter validation (#385)
  > Fix tests to use net_test_case (#383)

Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>

* Update S3CrtClient test to reflect loosened part size constraint

Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>

---------

Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance PRs to run benchmarks on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants