Skip to content

cache backend: option to cache only metadata (deprecated) #4097

Closed

Description

@harryqt

Update by ivandeex:
This description is outdated.
See #4097 (comment) and https://forum.rclone.org/t/how-to-cache-only-metadata-on-cache-remote/14846/5

[src]
type = drive
scope = drive
service_account_file = {redacted}
team_drive = {redacted}

[cachesrc]
type = cache
remote = src:
chunk_size = 0
chunk_clean_interval = 24h
info_age = 24h

[dst]
type = drive
scope = drive
service_account_file = {redacted}
team_drive = {redacted}

[cachedst]
type = cache
remote = dst:
chunk_size = 0
chunk_clean_interval = 24h
info_age = 24h
rclone sync cachesrc: cachedst: --fast-list --tpslimit=6 --drive-stop-on-upload-limit --drive-server-side-across-configs -vv

Instead of doing server side copy, Rclone doing normal copy.

Update:

Running the following command throwing errors.

rclone sync cachesrc: cachedst: --drive-stop-on-upload-limit --drive-server-side-across-configs -vv
C:\Users\HARRY>rclone sync cachesrc: cachedst: --drive-stop-on-upload-limit --drive-server-side-across-configs -vv
2020/03/30 11:02:08 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "sync" "cachesrc:" "cachedst:" "--drive-stop-on-upload-limit" "--drive-server-side-across-configs" "-vv"]
2020/03/30 11:02:08 DEBUG : Using config file from "C:\\Users\\HARRY\\.config\\rclone\\rclone.conf"
2020/03/30 11:02:08 DEBUG : cachesrc: wrapped src: at root
2020/03/30 11:02:08 INFO  : cachesrc: Cache DB path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachesrc.db
2020/03/30 11:02:08 INFO  : cachesrc: Cache chunk path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachesrc
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Memory: true
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Size: 0
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Total Size: 10G
2020/03/30 11:02:08 INFO  : cachesrc: Chunk Clean Interval: 1d
2020/03/30 11:02:08 INFO  : cachesrc: Workers: 4
2020/03/30 11:02:08 INFO  : cachesrc: File Age: 1d
2020/03/30 11:02:08 DEBUG : Adding path "cache/expire" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/stats" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/fetch" to remote control registry
2020/03/30 11:02:08 DEBUG : cachedst: wrapped dst: at root
2020/03/30 11:02:08 INFO  : cachedst: Cache DB path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachedst.db
2020/03/30 11:02:08 INFO  : cachedst: Cache chunk path: C:\Users\HARRY\AppData\Local\rclone\cache-backend\cachedst
2020/03/30 11:02:08 INFO  : cachedst: Chunk Memory: true
2020/03/30 11:02:08 INFO  : cachedst: Chunk Size: 0
2020/03/30 11:02:08 INFO  : cachedst: Chunk Total Size: 10G
2020/03/30 11:02:08 INFO  : cachedst: Chunk Clean Interval: 1d
2020/03/30 11:02:08 INFO  : cachedst: Workers: 4
2020/03/30 11:02:08 INFO  : cachedst: File Age: 1d
2020/03/30 11:02:08 DEBUG : Adding path "cache/expire" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/stats" to remote control registry
2020/03/30 11:02:08 DEBUG : Adding path "cache/fetch" to remote control registry
2020/03/30 11:02:08 DEBUG : Cache remote cachedst:: list ''
2020/03/30 11:02:08 DEBUG : Cache remote cachesrc:: list ''
2020/03/30 11:02:08 DEBUG : : list: warm 1 from cache for: , expiring on: 2020-03-31 11:00:48.8395238 +0530 IST
2020/03/30 11:02:08 DEBUG : : list: cached entries: [generatepress_child.zip]
2020/03/30 11:02:08 DEBUG : : list: warm 8 from cache for: , expiring on: 2020-03-31 10:58:36.1859809 +0530 IST
2020/03/30 11:02:08 DEBUG : : list: cached entries: [21.Bridges.2019.1080p.10bit.BluRay.6CH.x265.HEVC-PSA.mkv Bombshell.20
19.1080p.10bit.BluRay.6CH.x265.HEVC-PSA.mkv WP_Rocket_v3.5.1_Final.zip generatepress_child.zip gp-premium-1.9.1.zip rclone
-beta-latest-linux-amd64.zip themeforest-BW1E6RdJ-masterstudy-education-center-wordpress-theme.zip themeforest-VaFPTZIE-ma
sterstudy-education-center-wordpress-theme.zip]
2020/03/30 11:02:08 DEBUG : generatepress_child.zip: Size and modification time the same (differ by 0s, within tolerance 1
ms)
2020/03/30 11:02:08 DEBUG : generatepress_child.zip: Unchanged skipping
2020/03/30 11:02:08 INFO  : Cache remote cachedst:: Waiting for checks to finish
2020/03/30 11:02:08 INFO  : Cache remote cachedst:: Waiting for transfers to finish
2020/03/30 11:02:10 DEBUG : WP_Rocket_v3.5.1_Final.zip: moving offset set from 0 to 0
panic: runtime error: integer divide by zero

goroutine 74 [running]:
github.com/rclone/rclone/backend/cache.(*Handle).Seek(0xc000122600, 0x0, 0x0, 0x0, 0x0, 0x0)
        d:/a/rclone/src/github.com/rclone/rclone/backend/cache/handle.go:328 +0x631
github.com/rclone/rclone/backend/cache.(*Object).Open(0xc000144500, 0x1a74e40, 0xc0000bc2c0, 0xc0001b91e0, 0x1, 0x2, 0xc00
0386000, 0x180d58, 0x0, 0xa471bc)
        d:/a/rclone/src/github.com/rclone/rclone/backend/cache/object.go:235 +0x177
github.com/rclone/rclone/fs/operations.(*reOpen).open(0xc000122200, 0xc000122200, 0xc000144500)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/reopen.go:83 +0x287
github.com/rclone/rclone/fs/operations.newReOpen(0x1a74e40, 0xc0000bc2c0, 0x1a8a1a0, 0xc000144500, 0xc0003002b0, 0x0, 0xa,
 0x0, 0x0, 0x0, ...)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/reopen.go:49 +0x113
github.com/rclone/rclone/fs/operations.Copy(0x1a74e40, 0xc0000bc2c0, 0x1a8a120, 0xc00000aa80, 0x0, 0x0, 0xc0003bc0e0, 0x1a
, 0x1a8a1a0, 0xc000144500, ...)
        d:/a/rclone/src/github.com/rclone/rclone/fs/operations/operations.go:399 +0xf3c
github.com/rclone/rclone/fs/sync.(*syncCopyMove).pairCopyOrMove(0xc00000a000, 0x1a74e40, 0xc0000bc2c0, 0xc0000c60f0, 0x1a8
a120, 0xc00000aa80, 0xc00000a0d8)
        d:/a/rclone/src/github.com/rclone/rclone/fs/sync/sync.go:331 +0x223
created by github.com/rclone/rclone/fs/sync.(*syncCopyMove).startTransfers
        d:/a/rclone/src/github.com/rclone/rclone/fs/sync/sync.go:356 +0xb8

Activity

  1. Friday13th87 commented on Mar 30, 2020

    @Friday13th87

    why are u using fast-list / tpslimit / drive-stop-on-upload when u are trying to do a serverside copy?
    for me it is working actually and i am working without those options as they are designed for no-server-side copys for my understanding

  2. added this to the v1.52 milestone on Mar 31, 2020
  3. ncw commented on Mar 31, 2020

    @ncw
    Member

    It is the setting of chunk_size = 0 which is causing this problem.

    I'm not sure that is a valid value?

  4. harryqt commented on Mar 31, 2020

    @harryqt
    ContributorAuthor

    I'm not sure that is a valid value?

    It's done on purpose. I wants to cache metadata only, already discussed in forum.

  5. ncw commented on Mar 31, 2020

    @ncw
    Member

    Ah OK. I'm not sure that is a valid assumption though... Fancy having a rootle through the cache backend code and confirming or denying that? https://github.com/rclone/rclone/tree/master/backend/cache

  6. harryqt commented on Mar 31, 2020

    @harryqt
    ContributorAuthor
    2020/03/30 11:02:10 DEBUG : WP_Rocket_v3.5.1_Final.zip: moving offset set from 0 to 0
    panic: runtime error: integer divide by zero
    

    Hmm. Rclone crashes because it was trying to divide 0 with 0. on handle.go line 208. Actually you already mentioned this.

  7. ncw commented on Apr 1, 2020

    @ncw
    Member

    Do you think setting chunk_total_size might be a better way of achieving this?

    It seems that cache needs fixing up if chunk_size = 0

  8. harryqt commented on Apr 1, 2020

    @harryqt
    ContributorAuthor

    My main goal is to do server side copy with the help of cache, so I don't have to sync both src/dest over and over (as suggested by you).

    If I use cache-chunk-total-size then isn't rclone gonna download chunks and upload chunks? I think then server side copy won't work. I am testing it though, will update if it works.

    Update: Nope. Does not work. I added chunk_total_size = 10m and chunk_size = 1m but still rclone doing normal copy instead of server side copy. The --drive-server-side-across-configs does not comes into effect.

  9. scottmlew commented on Apr 6, 2020

    @scottmlew

    Although the actual issue appears to be different, your subject describes my open issue about files being reuploaded vs copied/moved locally, so I thought I'd link it to aid anyone perusing this for help

    https://forum.rclone.org/t/still-unable-to-move-files-on-gdrive/13921

  10. harryqt commented on May 25, 2020

    @harryqt
    ContributorAuthor

    Any update on this? Has anyone figured out any workaround?

  11. ncw commented on May 25, 2020

    @ncw
    Member

    We merged a fix which may be of interest 19ff7c9 - I'm not 100% sure this will fix your issue but it might be worth giving the latest beta a go.

  12. harryqt commented on May 29, 2020

    @harryqt
    ContributorAuthor

    Nah, still the same. 😞

  13. removed this from the v1.52 milestone on May 29, 2020
  14. 21 remaining items

  15. ivandeex commented on Mar 13, 2021

    @ivandeex
    Member

    Can we cache metadata only in vfs?

    I will investigate that.

  16. changed the title [-]Google drive server side copy does not work, when wrapped with cache.[/-] [+]vfs: option to cache only metadata[/+] on Mar 13, 2021
  17. changed the title [-]vfs: option to cache only metadata[/-] [+]vfs: option to cache only metadata (obsolete)[/+] on Mar 13, 2021
  18. ivandeex commented on Mar 13, 2021

    @ivandeex
    Member

    @Dibbyo456
    I opened a new feature request #5123
    Please subscribe to it

  19. ivandeex commented on Mar 13, 2021

    @ivandeex
    Member

    This thread is aggravated by deprecated and unrelated discussions.
    Closing.

  20. changed the title [-]vfs: option to cache only metadata (obsolete)[/-] [+]cache backend: option to cache only metadata (deprecated)[/+] on Mar 13, 2021
  21. removed their assignment
    on Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions