tiup icon indicating copy to clipboard operation
tiup copied to clipboard

mirror: Downloading tiup every time, while already exists

Open dveeden opened this issue 3 years ago • 2 comments

Bug Report

  1. What did you do?
tiup mirror clone /tmp/c --tidb v5.3.0
tiup mirror clone /tmp/c --tidb v5.3.0
  1. What did you expect to see?

Only downloading files the first time. (except for metadata)

  1. What did you see instead?

Downloading files like tiup-linux-arm64.tar.gz every time.

  1. What version of TiUP are you using (tiup --version)?
1.8.1 tiup
Go Version: go1.17.5
Git Ref: v1.8.1
GitHash: 559b99d0acb7d07acddbb8cda0304b0f27c6ec1e

If a mirror is refreshed every day or every hour this is wasting time, bandwidth, etc.

One of the problems is that there is no version in the filename for tiup.

dveeden avatar Jan 03 '22 17:01 dveeden

This logic is to make sure the tiup package is always exist and correctly, to avoid some unknown issue.
@dveeden Is there any real customer scenario that they will refresh the mirror every day or every hour?

qqqdan avatar Jan 12 '22 03:01 qqqdan

I would expect customers to setup a daily cronjob for this. They may also set the cronjob to be hourly as otherwise unlucky timing might cause them to have to wait 23h or so or run the job manually.

How would you expect customers to use this? Only update manually or with an automated process? Or is there some rsync method? With RPM/YUM based software it would automatically update based on the metadata.

dveeden avatar Jan 14 '22 07:01 dveeden