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

Discovery: No fatal error on bad server response #7134

Closed
wants to merge 1 commit into from

Conversation

ckamm
Copy link
Contributor

@ckamm ckamm commented Apr 9, 2019

Previously receiving unexpected replies from the server during discovery
would terminate the sync run with a fatal error. Now it only causes an
error on the affected item.

For #6826

Previously receiving unexpected replies from the server during discovery
would terminate the sync run with a fatal error. Now it only causes an
error on the affected item.
@ckamm ckamm added this to the 2.6.0 milestone Apr 9, 2019
@ckamm ckamm self-assigned this Apr 9, 2019
@ckamm ckamm requested a review from ogoffart April 9, 2019 13:21
@ogoffart
Copy link
Contributor

ogoffart commented Apr 9, 2019

The test was making sure that the filename where the problem occurs is in the error message. This should stay.

Edit: Ok, not needed since the error is on the file itself.

@ckamm
Copy link
Contributor Author

ckamm commented Apr 9, 2019

Since the error is now located on the affected item it's no longer necessary to include the file name in the message itself. We do appendErrorString(QObject::tr("%1: %2").arg(item->_file, item->_errorString));

@ogoffart
Copy link
Contributor

ogoffart commented Apr 9, 2019

This sounds like a dangerous change.

It is true that this is now made possible to ignore part of the tree with the new discovery.

What happens if the server suddenly goes in maintenance or away? Do we get many ignore "error".

If a file is moved to a directory which now errors, the file will simply be deleted. Is that ok?

@ckamm
Copy link
Contributor Author

ckamm commented Apr 10, 2019

Yes, doing discovery with partial remote information would affect things like renames/moves in the way you mention.

And thinking about it more, I agree that it's a bad idea to open the sync algorithm for this kind of complication. If we look a the user issue "my remote discovery takes very very long and if it has any kind of error it has to start from scratch" it's likely that we can solve this in another way (like the discovery cache we talked about) without starting to sync when we know we don't have an up to date remote snapshot.

Note: The maintenance mode (503) behavior already works in this way: it was already handled by ignoring the folders where the error appeared.

@ckamm ckamm closed this Apr 10, 2019
@ckamm
Copy link
Contributor Author

ckamm commented Apr 10, 2019

I'll extract some changes from this patch and open a new PR with these.

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.

2 participants