Skip to content

Conversation

@ogoffart
Copy link
Contributor

When it changes, assume a backup was recovered, and keep conflict files.

Issues: #2325 and https://github.com/owncloud/enterprise/issues/966

@ogoffart
Copy link
Contributor Author

Smashbox test: owncloud/smashbox#149

Copy link
Contributor

Choose a reason for hiding this comment

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

true || ?

Copy link
Contributor

Choose a reason for hiding this comment

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

If this is anyway server global according to @PVince81 we could always read it maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we wasting bandwidth by requesting it all the time so it is returned with each file/directory in each PROPFIND in the discovery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, leftover from debugging. well spot.

But we don't request it all the time, only for the first folder, see previous hunk (_isRootPath)

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like the isRootPath parameter. It's cluttering of the interface.

I think it would be nicer if you would either set all props from the class that creates the job using setProperties(), or even better add a method addProperty( a_property) that is called in case it is a root object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DiscoverySingleDirectoryJob is an internal class to the discovery job, it's not really a public class with an exported interface. Its role is to abstract the protocol part of the discovery. In that sens, the name of the properties are part of the protocol and should be IMHO kept inside this class.

@guruz guruz added this to the 2.3.0 milestone Jul 13, 2016
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct? Should it use sqlite3_bind_blob(64)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually don't know what's the difference here. I guess it's maybe related to \0 in the string? Then maybe indeed blob could be better (more generic) but currently, in owncloud, we don't have any field of type blob, only text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this is just an optimisation, maybe i could leave it out and then it would use the text16 fallback as toString which is just a bit of a waste.

Copy link
Contributor

@guruz guruz Jul 14, 2016

Choose a reason for hiding this comment

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

(I meant because of encoding issues..QByteArray.. but since the data-fingerprint is from WebDAV it is probably anyway safe ascii or so)

auto databaseFingerprint = _journal->dataFingerprint();
// If databaseFingerprint is null, this means that there was no information in the database
// (for example, upgrading from a previous version, or first sync)
// Note that an empty ("") fingerprint is valid and means it was empty on the server before.
Copy link
Contributor

Choose a reason for hiding this comment

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

i still don't understand why there is a difference between empty and null. Why can't they be treated the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Null means there was no entry before.

Empty means there was one, and it was empty.
By default, on the server, it is empty.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah. Weeeeird. But I guess this is because it was added later to the server

FYI @rullzer

guruz added a commit to owncloud/core that referenced this pull request Jul 14, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
When it changes, assume a backup was recovered, and keep conflict files.

Issues: #2325 and https://github.com/owncloud/enterprise/issues/966
@guruz
Copy link
Contributor

guruz commented Aug 2, 2016

@ogoffart
Copy link
Contributor Author

ogoffart commented Aug 2, 2016

There is a smashbox test: owncloud/smashbox#149
But it does not replace manual QA.

@ogoffart ogoffart merged commit 88e5a94 into master Aug 2, 2016
@ogoffart ogoffart deleted the restore_backup branch August 2, 2016 08:42
PVince81 pushed a commit to owncloud/core that referenced this pull request Aug 11, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
DeepDiver1975 pushed a commit to owncloud/core that referenced this pull request Aug 13, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
DeepDiver1975 pushed a commit to owncloud/core that referenced this pull request Aug 13, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
@rperezb
Copy link

rperezb commented Aug 24, 2016

@davitol this is already tested, isn't it?

@davitol
Copy link

davitol commented Aug 24, 2016

@rperezb No, it isn't. The scenarios tested were related to Fix detection of backup or full resync, but not to the data-fingerprint property.

Right now i'm catching up how all this stuff of data-fingerprint works in oC. ASAP it is tested, i'll write it here.

blizzz pushed a commit to nextcloud/server that referenced this pull request Aug 29, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
blizzz pushed a commit to nextcloud/server that referenced this pull request Aug 29, 2016
For owncloud/client#5056
Users can configure arbitrary subfolders for syncing, therefore we should
always return it when asked for.
The sync client makes sure to not always ask for it to save bandwidth.
@davitol
Copy link

davitol commented Sep 14, 2016

#5185

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