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

RCORE-2227 Updated non-streaming upload progress to report 1.0 if nothing to upload #7957

Closed
wants to merge 3 commits into from

Conversation

michael-wb
Copy link
Contributor

@michael-wb michael-wb commented Aug 6, 2024

What, How & Why?

Currently, the non-streaming upload progress callback notifications would report an estimate of 0.0 and the notification callback was being expired if the uploadable and uploaded values were reported as zero. Since the notification estimate is being expired, it make better sense to report the estimate of 1.0, since that suggests that the notification request is complete.

These changes update the notification callback invocation routine to report an estimate of 1.0 if the uploaded and uploadable values are 0. The original tests that checked for 0.0 were updated.

In addition, some of the tests were SyncProgressNotifier::update() with an estimates of 0.0 when the uploadable/uploaded or downloadable/downloaded values were zero. These calls were updated to provide an estimate of 1.0, since that mimics the actual behavior of the sync client progress reporting.

Fixes #7952

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • [ ] C-API, if public C++ API changed
  • [ ] bindgen/spec.yml, if public C++ API changed

@michael-wb michael-wb self-assigned this Aug 6, 2024
@cla-bot cla-bot bot added the cla: yes label Aug 6, 2024
Michael Wilkerson-Barker added 2 commits August 6, 2024 17:10
Copy link

Pull Request Test Coverage Report for Build michael.wilkersonbarker_1316

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 2 files are covered.
  • 61 unchanged lines in 12 files lost coverage.
  • Overall coverage decreased (-0.007%) to 91.095%

Files with Coverage Reduction New Missed Lines %
src/realm/dictionary.cpp 1 85.16%
src/realm/sort_descriptor.cpp 1 94.06%
test/test_util_network_ssl.cpp 1 89.59%
src/realm/cluster.cpp 2 75.85%
src/realm/sync/network/http.hpp 2 82.27%
src/realm/sync/client.cpp 3 90.96%
src/realm/sync/noinst/protocol_codec.hpp 3 75.74%
test/fuzz_group.cpp 4 46.41%
src/realm/sync/noinst/server/server.cpp 5 74.61%
src/realm/index_string.cpp 8 84.63%
Totals Coverage Status
Change from base Build 2546: -0.007%
Covered Lines: 217009
Relevant Lines: 238222

💛 - Coveralls

@michael-wb michael-wb marked this pull request as draft August 12, 2024 19:53
@michael-wb
Copy link
Contributor Author

No longer being done since an upload progress report should not be sent if there is nothing to upload after a client reset.

@michael-wb michael-wb closed this Aug 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-streaming upload progress should report an estimate of 1 upon completion of a client reset.
2 participants