Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ItielOlenick opened this issue Feb 12, 2025 · 0 comments · May be fixed by #793
Open

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

ItielOlenick opened this issue Feb 12, 2025 · 0 comments · May be fixed by #793

Comments

@ItielOlenick
Copy link

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.
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 a pull request may close this issue.

1 participant