From 021bca35060adc2c0697fe7e0721917c9845d22f Mon Sep 17 00:00:00 2001 From: Slach Date: Fri, 26 Jul 2024 21:46:51 +0400 Subject: [PATCH] debug https://github.com/Altinity/clickhouse-backup/issues/888, debug TestLongListRemote --- .github/workflows/build.yaml | 4 ++-- pkg/storage/general.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9f0fd3a9..973974a0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -273,8 +273,8 @@ jobs: GOROOT: ${{ env.GOROOT_1_22_X64 }} CLICKHOUSE_VERSION: ${{ matrix.clickhouse }} # options for advanced debug CI/CD - RUN_TESTS: "TestLongListRemote" - LOG_LEVEL: "debug" + # RUN_TESTS: "TestLongListRemote" + # LOG_LEVEL: "debug" # TEST_LOG_LEVEL: "debug" # GCS_DEBUG: "true" # SFTP_DEBUG: "true" diff --git a/pkg/storage/general.go b/pkg/storage/general.go index b802e3ae..adea2154 100644 --- a/pkg/storage/general.go +++ b/pkg/storage/general.go @@ -246,7 +246,7 @@ func (bd *BackupDestination) BackupList(ctx context.Context, parseMetadata bool, sort.SliceStable(result, func(i, j int) bool { return result[i].UploadDate.Before(result[j].UploadDate) }) - if cacheMiss { + if cacheMiss || len(result) < len(listCache) { if err = bd.saveMetadataCache(ctx, listCache, result); err != nil { return nil, fmt.Errorf("bd.saveMetadataCache return error: %v", err) }