Skip to content

[Bug] Unnecessary headObject calls on cp command when progress bar is disabled #792

@ItielOlenick

Description

@ItielOlenick

Description:
When using the cp command to copy or download objects, the progress bar logic is making an unnecessary headObject call (via client.stat) to retrieve the size of the object, even when the progress bar is explicitly disabled. This results in:

  1. Increased Latency: Each unnecessary headObject call adds overhead, especially when downloading or copying a large number of small files.
  2. Unnecessary Costs: Since headObject calls are billed requests, this behavior incurs additional costs for users, particularly in use cases involving bulk operations.

Expected Behavior:
If the progress bar is disabled (default), the cp command should skip the headObject call entirely, as the object size is not needed for progress tracking.

Steps to Reproduce:

  1. Run a cp command with the progress bar disabled (default).
  2. Observe network traffic logs (--log=trace) to confirm that a headObject call is still being made.

Impact:

  • Performance: Slower operations due to unnecessary API calls.
  • Cost: Increased billing for headObject requests, especially in bulk operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions