The `io/ioutil` package has been deprecated in Go 1.16 (See
https://pkg.go.dev/io/ioutil). This PR replaces the existing `io/ioutil`
functions with their new definitions in `io` and `os` packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* [6415](https://github.com/grafana/loki/pull/6415) **salvacorts**: Evenly spread queriers across kubernetes nodes.
* [6349](https://github.com/grafana/loki/pull/6349) **simonswine**: Update the default HTTP listen port from 80 to 3100. Make sure to configure the port explicitly if you are using port 80.
* [6835](https://github.com/grafana/loki/pull/6835) **DylanGuedes**: Add new per-tenant query timeout configuration and remove engine query timeout.
* [7212](https://github.com/grafana/loki/pull/7212) **Juneezee**: Replaces deprecated `io/ioutil` with `io` and `os`.
// put a corrupt zip file in the table which should cause the compaction to fail in the middle because it would fail to open that file with boltdb client.
require.NoError(t,ioutil.WriteFile(filepath.Join(tablePathInStorage,"fail.gz"),[]byte("fail the compaction"),0o666))
require.NoError(t,os.WriteFile(filepath.Join(tablePathInStorage,"fail.gz"),[]byte("fail the compaction"),0o666))
// since we are moving to keeping files for same table in a folder, if current element is a file we need to move it inside a directory with the same name
// i.e file index_123 would be moved to path index_123/index_123.
if!fileInfo.IsDir(){
level.Info(util_log.Logger).Log("msg",fmt.Sprintf("found a legacy file %s, moving it to folder with same name",fileInfo.Name()))