Skip to content

Classify chunked items correctly. Issue #5850 - #5852

Merged
guruz merged 1 commit into
masterfrom
fix_chunking_ng
Jul 3, 2017
Merged

guruz merged 1 commit into
masterfrom
fix_chunking_ng

Conversation

@mrow4a

@mrow4a mrow4a commented Jun 20, 2017

Copy link
Copy Markdown
Contributor

This should solve #5850.

Please note: we cannot set chunk size of PUT V1 to _chunkSize which is dynamic because PUT V1 will not adjust dynamic chunk size. If we want it, we need to make code adjusting dynamic chunk size both for V1 and NG.

@mrow4a
mrow4a requested review from ckamm, guruz, jturcotte and ogoffart June 20, 2017 18:32
@mrow4a

mrow4a commented Jun 20, 2017

Copy link
Copy Markdown
Contributor Author

selection_029

Comment thread src/libsync/owncloudpropagator.cpp Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because of that, after dynamic chunk has been readjusted to 100MB, this file has been classified as V1, being 50MB in size. With _initialChunkSize being 10MB, it is classified as to be chunked and having high dynamic chunk, being send in one shot.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, that's correct. Thanks for spotting and fixing this.

@ogoffart ogoffart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this. Please just fix or remove the missleading comment before pushing.

Comment thread src/libsync/propagateuploadng.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this comment is wrong. This has nothing to do with the classification, quite the contrary. It is the actual size that will be used by the chunking-ng algorithm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, maybe I need to rewrite this. The intiention was to say that this is the dynamic chunk size of the item, which has been classified to be chunked.

Comment thread src/libsync/owncloudpropagator.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, that's correct. Thanks for spotting and fixing this.

Comment thread src/libsync/propagateuploadv1.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you anyway change the commit, remove this one too :)

@guruz guruz added this to the 2.4.0 milestone Jun 21, 2017
@mrow4a
mrow4a force-pushed the fix_chunking_ng branch from d7e3dbd to 32d7c56 Compare June 21, 2017 11:04
@mrow4a
mrow4a force-pushed the fix_chunking_ng branch from 32d7c56 to a43cf2a Compare June 21, 2017 11:05
@mrow4a

mrow4a commented Jun 21, 2017

Copy link
Copy Markdown
Contributor Author

Done

@ogoffart ogoffart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@ckamm ckamm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With this change we'll start using chunked upload via PropagateUploadFileNG for files that will only have a single chunk. I assume that was tested and is safe.


/** The initial un-adjusted chunk size in bytes for chunked uploads
/** The initial un-adjusted chunk size in bytes for chunked uploads, both
* for old and new chunking algorithm, which classifies the item to be chunked

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When you say "which classifies the item to be chunked" (also below) that's confusing because it's ambiguous. "which is used to decide whether an item should be chunked" would be clearer.

@mrow4a

mrow4a commented Jun 27, 2017 •

Copy link
Copy Markdown
Contributor Author

@guruz why the jenkins test is not passing (it is also not for master), can we merge this PR?

@ogoffart

ogoffart commented Jul 3, 2017

Copy link
Copy Markdown
Contributor

@mrow4a the jenkins error seems to be unrelated to this change:

6: QWARN  : TestSyncJournalDB::testFileRecord() sync.database.sql: Sqlite exec statement error: 5 "database is locked" in "INSERT OR IGNORE INTO checksumtype (name) VALUES (?1)"
6: QWARN  : TestSyncJournalDB::testFileRecord() sync.database.sql: Sqlite exec statement error: 5 "database is locked" in "INSERT OR REPLACE INTO metadata (phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm, filesize, ignoredChildrenRemote, contentChecksum, contentChecksumTypeId) VALUES (?1 , ?2, ?3 , ?4 , ?5 , ?6 , ?7,  ?8 , ?9 , ?10, ?11, ?12, ?13, ?14, ?15, ?16);"
6: FAIL!  : TestSyncJournalDB::testFileRecord() 'storedRecord == record' returned FALSE. ()
6:    Loc: [/var/lib/jenkins/workspace/cloud-client_client_PR-5852-5C3JT3EY7EHDKWSDVRI76HKJJMTNLBZ76KGHLTTGG25CKR2ASZYA/test/testsyncjournaldb.cpp(78)]

I'd say we can merge this change. yes

@guruz
guruz merged commit d1e0009 into master Jul 3, 2017
@guruz
guruz deleted the fix_chunking_ng branch July 3, 2017 12:41
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.

4 participants