Skip to content

bisync: align --max-delete flag semantics #5680

Closed as not planned
Closed as not planned

Description

@ivandeex

Synopsis

Currently --max-delete in bisync has syntax different from the rest of rclone - it means a percentage. Instead, it should have an optional trailing % sign like --max-delete 50% to mean the maximum share of deleted files. Without % it should set a maximum number of the total number of files deleted rather than a percentage like the rest of rclone. The default should stay as is i.e. 50%. This behavior should be retained in the bisync rc handler.

We could later implement the % trick in the rest of rclone too (out of scope for this request).

Prior discussions

#5164 (comment)

iva: I made bisync use the generic --max-delete flag but as a percentage in range 0..100 rather than absolute number of deleted objects. Maybe it's better to rename it as --max-delete-percent or --bisync-max-delete?

ncw: I think --max-delete should probably set a maximum of the total number of files deleted rather than a percentage. Could you use it that way in bisync? Maybe it could have an optional trailing % sign so --max-delete 5% and we could implement that in the rest of rclone too.

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. added this to the v1.58 milestone on Oct 8, 2021
  2. self-assigned this
    on Oct 8, 2021
  3. changed the title [-]bisync: align syntax of the `--max-delete` flag[/-] [+]bisync: align `--max-delete` flag semantics[/+] on Oct 8, 2021
  4. modified the milestones: v1.58, v1.59 on Jan 14, 2022
  5. modified the milestones: v1.59, v1.60 on Mar 19, 2022
  6. modified the milestones: v1.60, Help Wanted on Dec 5, 2022
  7. moved this to To do in bisyncon Aug 20, 2024
  8. nielash commented on Sep 30, 2026

    @nielash
    Contributor

    I think the ship has sailed on this one. Bisync's --max-delete has been a percentage since the beginning, and changing it to a file count now would silently change what a safety check means for everyone already using it -- --max-delete 10 would go from 10% to 10 files, with no error or warning.

    The real problem is that the same flag means something different for sync and bisync. Neither meaning is wrong, but the clean fix is a rename, which is a breaking change, so I've added it to Breaking changes for v2 instead.

    In the meantime, #10015 (in review, as of this writing) makes a couple of related improvements:

    • --max-delete above 100 is now an error in bisync, enforcing the 0-100 range this was designed with. Previously, a value like --max-delete 500 was treated as 100%, which turned off the check.
    • The rc now takes --max-delete the same way as the command line, including the 50% default this issue asked to keep for the rc.

    So I'm going to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions