Repository navigation
Chunker overlay remote - #3503
Conversation
|
Integration tests performed successfully with Chunker overlay above the following remotes: local box mailru. |
ncw
left a comment
There was a problem hiding this comment.
That is looking really good! Well done getting all the integration tests to pass - that is hard work.
I've put some comments inline for you to look at.
Looking forward to merging :-)
ncw
left a comment
There was a problem hiding this comment.
Another comment (I think I pressed the wrong button ;-)
|
Is there a beta build of this version available yet? |
|
|
A quick way to reproduce chunker failure with multipart uploads described above #3503 (comment) is to set box multipart cutoff to 50M, chunker chunk size to 100M and upload a 200M file. Add this to and invoke this command: |
|
New Now integration tests run for a matrix of chunker parameters: chunking on/off (via Most tests use small test files, less than 100 bytes, frequently 3-5 bytes. Recommended |
|
I have tried using: On my OpenDrive crypt. It does seem to chunk things nicely. However, it does not finish a file. It just uploads the first chunk, then moves on to the next file. This basically means that it will do all first chunks of all files first, then probably all second chunks etc. Maybe this is intended behaviour, but I thought I'd point it out. |
|
@Loewkie Please send here your wrapped remote section, your failing command and describe file sizes. After I investigate a known issue with box and finish next review with @ncw , I will try to reproduce your issue. Hopefully we can fix it by the merge in v1.50. If not, we can open a dedicated issue. |
|
@ivandeex All remotes involved, taken from config: And the GDrive which I'm transferring from: The 'failing' command: And finally, the file sizes we're looking at here are 17G, 19G, 14G, 12G, 16G etc. |
|
I've given the code a once over - it is looking good :-) Apologies for the delay! Can you rebase it then squash it into something like
If could arrange the commits so that rclone compiles for each one that helps bisection! I'll merge it then. We have a little while (until 12th October) until the 1.50 release which should hopefully give us a chance to shake any bugs out! Thank you :-) |
I will add documentation and squash/rebase commits in the next days.
I also have a small optimization patch for mailru remote, will submit a PR ;) |
Note: chunker implements many irrelevant methods (UserInfo, Disconnect etc), but they are required by TestIntegration/FsCheckWrap and cannot be removed. Dropped API methods: MergeDirs DirCacheFlush PublicLink UserInfo Disconnect OpenWriterAt Meta formats: - renamed old simplejson format to wdmrcompat. - new simplejson format supports hash sums and verification of chunk size/count. Change list: - split-chunking overlay for mailru - add to all - fix linter errors - fix integration tests - support chunks without meta object - fix package paths - propagate context - fix formatting - implement new required wrapper interfaces - also test large file uploads - simplify options - user friendly name pattern - set default chunk size 2G - fix building with golang 1.9 - fix ci/cd on a separate branch - fix updated object name (SyncUTFNorm failed) - fix panic in Box overlay - workaround: Box rename failed if name taken - enhance comments in unit test - fix formatting - embed wrapped remote rather than inherit - require wrapped remote to support move (or copy) - implement 3 (keep fstest) - drop irrelevant file system interfaces - factor out Object.mainChunk - refactor TestLargeUpload as InternalTest - add unit test for chunk name formats - new improved simplejson meta format - tricky case in test FsIsFile (fix+ignore) - remove debugging print - hide temporary objects from listings - fix bugs in chunking reader: - return EOF immediately when all data is sent - handle case when wrapped remote puts by hash (bug detected by TestRcat) - chunked file hashing (feature) - server-side copy across configs (feature) - robust cleanup of temporary chunks in Put - linear download strategy (no read-ahead, feature) - fix unexpected EOF in the box multipart uploader - throw error if destination ignores data
Recommended `rclone.conf` snippets for this `config.yaml`: ``` [TestChunkerLocal] type = chunker meta_format = simplejson remote = /tmp/rclone-chunker-test [TestChunkerChunk3bLocal] type = chunker chunk_size = 3b meta_format = simplejson remote = /tmp/rclone-chunker-test [TestChunkerNometaLocal] type = chunker meta_format = none remote = /tmp/rclone-chunker-test [TestChunkerChunk3bNometaLocal] type = chunker chunk_size = 3b meta_format = none remote = /tmp/rclone-chunker-test [TestChunkerCompatLocal] type = chunker meta_format = wdmrcompat remote = /tmp/rclone-chunker-test ```
|
@ncw Few points need clearing:
Seemingly I addressed all your comments. |
|
Aditional points collected after self-review. I will address them together with yours:
|
|
@Loewkie I cannot reproduce your issue using the latest beta. Please submit as a separate ticket if the problem holds for you after v1.50. |
|
Thank you @ivandeex. I'll have a look. |
|
Also, some ideas for future:
|
|
Interesting work. Thanks @ivandeex |
|
Apologies for the delay
Great - thank you :-)
It doesn't matter too much. Empty is for when the hash is supported but you haven't got one for some reason (eg chunked files in S3). If the hash can never be supported then unsupported.
They look like they might be useful, I don't mind leaving them in. I'll be guided by you here.
My main concern with the fastopen is opening too many file handles at once when chunk is small compared to the file size. If you are happy with the speed of linear then maybe we should remove the fastopen strategy.
Ouch... That needs fixing properly in the s3 backend. I think the thinking was that the large chunk sizes are needed because you can only have a limited number of chunks (10,000 I think). However 2GB of memory is way too much! This will be used in The swift backend probably does the same thing... Not sure about the other bucket based remotes.
Yes that is not very sustainable! I've spend quite a bit of time mucking about just getting those tests to pass, so maybe they should do something different, or maybe certain backends could opt out of the counting parts of those tests (eg union and chunker).
You could move the failing test into a subtest then exclude it in rclone/fstest/test_all/config.yaml Line 58 in 49d6d64 That is the way I'm dealing with backend test failures at the moment
Not sure what you mean by iff condition, but I think that the counts are a smell of a bad test - I should think of a better way of doing this!
OK
Happy for you to remove it, or fix it.
Great idea.
I'll leave that to you to decide... I'm easy either way.
Probably a good idea!
I normally stick these in a comment in the backend code.
I had a look through the code and didn't see anything I particularly thought needed changing. I'd like to merge this so we have time for a bit of testing before 1.50. I also have some changes I'd like to merge which will require a bit of work on mailru/chunker before 1.50 too (see filename-encode branch and how far I got so far with the integration tests) so getting this in sooner and fixing it up after would be my preference :-) |
|
Thanks. Please merge now as you decided. I will be submitting 2nd PR with clear points this week:
Now on to vague points:
|
|
Ok sounds like a good plan! I'll merge this now. I'll try to can the s3 memory usage properly (see #/3568) Can you paste suggested config for the backends in |
Note: The next chunker PR will remove |
|
Thanks. I've added those. Check out https://pub.rclone.org/integration-tests/current/ after 0800 GMT tomorrow. |
What is the purpose of this change?
Many cloud providers limit file size depending on account tier.
This PR creates Chunker, an overlay remote that transparently splits large files during put, finds paers during directory scans and transparently merges parts when a file is downloaded. Chunks are kept on the underlying remote as ordinary files. The overlay supports configurable chunk size and flexible naming schemes configured with user-friendly patterns. It has a small memory footprint and performs most actions on the fly without using temporary files.
Was the change discussed in an issue or in the forum before?
Yes. See #497
Checklist