Skip to content

Backport #7755 and #7861 to release-1.22 - #7874

Merged
CharlieTLe merged 2 commits into
cortexproject:release-1.22from
CharlieTLe:backport-7755-7861-release-1.22
Oct 6, 2026
Merged

CharlieTLe merged 2 commits into
cortexproject:release-1.22from
CharlieTLe:backport-7755-7861-release-1.22

Conversation

@CharlieTLe

Copy link
Copy Markdown
Member

Backports two bug fixes to release-1.22. They would go out in v1.22.0-rc.3.

#7861: Compactor tenant cleanup reported as failed
When the compactor does the final cleanup of a tenant marked for deletion, it reports the cleanup as failed on object stores that return an error when deleting a missing object (GCS, Azure, Swift, OCI). The fix is in pkg/util/users/tenant_deletion_mark.go. The PR also fixes the TestBlocksCleaner flake. On master its CHANGELOG entry sits under master / unreleased. Here it is moved into the 1.22.0 in progress section.

#7755: Parquet converter error messages
Error messages in the parquet converter referred to the compactor ring instead of the parquet converter ring. Only the message text changes. Master's CHANGELOG already lists this under 1.22.0 in progress, but the commit was never on release-1.22. Without this backport, 1.22.0 would ship without a fix its changelog claims.

Both commits cherry-picked cleanly with -x. The only manual edit is the CHANGELOG placement of #7861.

Verification

  • go build -tags "netgo slicelabels" ./...: clean
  • go test -tags "netgo slicelabels" ./pkg/parquetconverter/... ./pkg/util/users/... ./pkg/compactor/...: ok

SungJin1212 and others added 2 commits October 6, 2026 15:27
… parquet converter (cortexproject#7755)

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Co-authored-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
(cherry picked from commit 1f6ce6b)
Signed-off-by: Charlie Le <charlie_le@apple.com>
… flake (cortexproject#7861)

TestBlocksCleaner still flakes after cortexproject#7386. That change made the
per-tenant cleanup wait for the visit marker HeartBeat goroutine to
exit, closing the race between the heartbeat's final writes and the
test's t.Cleanup. The heartbeat's first write can still overlap the
cleaner's own deletions under the same tenant: the filesystem bucket's
Delete removes each emptied parent directory with os.RemoveAll, and a
concurrent Upload of <tenant>/markers/cleaner-visit-marker.json makes
it fail with "unlinkat <bucket>/user-4/markers: directory not empty".
deleteUserMarkedForDeletion then returns before deleting the tenant
deletion mark, which is the failure seen on CI (user-4's mark still
exists at blocks_cleaner_test.go:275).

Object stores have no directories, so the race only affects the
filesystem bucket, where a failed run is retried on the next cleanup
cycle. Switch TestBlocksCleaner to the in-memory bucket, like cortexproject#7486 did
for TestBlocksCleaner_ShouldRemoveBlocksOutsideRetentionPeriod, and
assert that no cleaner visit marker is left once the initial cleanup
has completed, so the test keeps guarding the cortexproject#7386 fix.

Doing so exposed a production bug: DeleteTenantDeletionMark deletes the
mark from the global and then the legacy per-tenant location and
returns any error. The per-tenant mark is never there at that point
(since cortexproject#5676 marks are only written to the global location, and the
tenant's markers/ prefix was deleted just before), so on object stores
whose Delete fails for a missing object (GCS, Azure, Swift, OCI) the
final cleanup of every deleted tenant is reported as failed. Ignore
not-found errors, like bucketindex.DeleteIndex and DeleteIndexSyncStatus
already do, and assert in TestBlocksCleaner that the deleted-tenants run
completes without failures.

Fixes cortexproject#7564

Signed-off-by: Sandy Chen <Yuxuan.Chen@morganstanley.com>
(cherry picked from commit cc57488)
Signed-off-by: Charlie Le <charlie_le@apple.com>
@CharlieTLe
CharlieTLe requested a review from a team as a code owner October 6, 2026 19:30
@CharlieTLe
CharlieTLe requested review from danielblando and removed request for a team October 6, 2026 19:30
@CharlieTLe
CharlieTLe merged commit 2472f6d into cortexproject:release-1.22 Oct 6, 2026
40 checks passed
CharlieTLe added a commit that referenced this pull request Oct 6, 2026
Bumps VERSION to 1.22.0-rc.3 ahead of tagging v1.22.0-rc.3.

rc.3 carries #7755 and #7861, backported in #7874.

Signed-off-by: Charlie Le <charlie_le@apple.com>
CharlieTLe added a commit that referenced this pull request Oct 6, 2026
#7861 is backported to release-1.22 in #7874, so its entry belongs in the 1.22.0 section rather than master / unreleased.

Signed-off-by: Charlie Le <charlie_le@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants