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

fix general section #4439

Merged
merged 1 commit into from
Jun 22, 2022
Merged

fix general section #4439

merged 1 commit into from
Jun 22, 2022

Conversation

jospoortvliet
Copy link
Member

@jospoortvliet jospoortvliet commented Apr 14, 2022

This PR fixes 3 things in the documentation of the config file.

  • First, there is a table that has gone missing in our documentation due to a formatting error. It is now back.
  • Second, it fixes the targetChunkUploadDuration value for chunking that was described to be defaulting to 6000 (10 seconds) instead of the reality, which is 60000 (1 minute)
  • Third, it adds a short section in the Troubleshooting file about the Cloudflare issues users have been having, where the connection is abruptly closed because Cloudflare DNS blocks uploads >100 mb.

Ideally, the chunking algorithm considers a closed connection as similar to a connection exceeding its targetChunkUploadDuration, decreasing the chunk size again and therefor still succeeding in uploading a file. This can probably be fixed relatively easy, and beats a documentation change, but I can only change documentation, not code.

So with this PR we now explain how people can manually lower the chunk size, which can be helpful in other situations too.

See #4278 (comment)

Signed-off-by: jos poortvliet [email protected]

@jospoortvliet
Copy link
Member Author

I have one open question with regards to this code/documentation, see the issue:

People report that setting
targetChunkUploadDuration=6000
Fixes their problem.

Now that makes no sense, as the docs say that that IS the default. Looking at the code, it does something that - well, it's no surprise I don't understand it, but pls double check if that indeed leads to 6000 please ;-)

qint64 ConfigFile::minChunkSize() const
{
    QSettings settings(configFile(), QSettings::IniFormat);
    return settings.value(QLatin1String(minChunkSizeC), 1000 * 1000).toLongLong(); // default to 1 MB
}

chrono::milliseconds ConfigFile::targetChunkUploadDuration() const
{
    QSettings settings(configFile(), QSettings::IniFormat);
    return millisecondsValue(settings, targetChunkUploadDurationC, chrono::minutes(1));
}

@Gwindalmir
Copy link

Gwindalmir commented Apr 14, 2022

The default according to the log files is 60000 (1 minute).

2022-04-14 11:09:41:146 [ info nextcloud.sync.propagator.upload.ng C:\Users\sysadmin\AppData\Local\Temp\2\windows-9586\client-building\desktop\src\libsync\propagateuploadng.cpp:418 ]: Chunked upload of 10000000 bytes took 2552 ms, desired is 60000 ms, expected good chunk size is 235109717 bytes and nudged next chunk size to 122554858 bytes

@jospoortvliet
Copy link
Member Author

The default according to the log files is 60000 (1 minute).

2022-04-14 11:09:41:146 [ info nextcloud.sync.propagator.upload.ng C:\Users\sysadmin\AppData\Local\Temp\2\windows-9586\client-building\desktop\src\libsync\propagateuploadng.cpp:418 ]: Chunked upload of 10000000 bytes took 2552 ms, desired is 60000 ms, expected good chunk size is 235109717 bytes and nudged next chunk size to 122554858 bytes

Good catch, updated!

@sonarcloud
Copy link

sonarcloud bot commented Apr 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mgallien mgallien requested review from mgallien, camilasan and claucambra and removed request for FlexW May 4, 2022 11:38
@mgallien
Copy link
Collaborator

mgallien commented May 4, 2022

/backport to stable-3.5

@camilasan
Copy link
Member

@jospoortvliet please remove the merge commits.

@claucambra
Copy link
Collaborator

DCO is failing, please sign-off the commits :)

@claucambra
Copy link
Collaborator

DCO is failing, please sign-off the commits :)

@jospoortvliet Ping? :)

- Fix table that was missing
- Updates targetChunkUploadDuration and maxChunkSize.
- Adds section about Cloudflare.

Signed-off-by: Jos Poortvliet <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Jun 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #4439 (71dbd11) into master (af93a98) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4439      +/-   ##
==========================================
- Coverage   56.42%   56.42%   -0.01%     
==========================================
  Files         138      138              
  Lines       17071    17071              
==========================================
- Hits         9633     9632       -1     
- Misses       7438     7439       +1     
Impacted Files Coverage Δ
src/libsync/propagatedownload.cpp 65.18% <0.00%> (-0.15%) ⬇️

@nextcloud-desktop-bot
Copy link

AppImage file: Nextcloud-PR-4439-71dbd1103f96ea909e79e8c2d4f87331b248d73a-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien mgallien merged commit 743486f into master Jun 22, 2022
@mgallien mgallien deleted the jospoortvliet-patch-1 branch June 22, 2022 15:16
@mgallien mgallien added this to the 3.6.0 milestone Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants