cockroachdb / cockroachdb/cockroach

sql/gcjob: one subcase of TestProtectedTimestampsPreventGC fails when pointed to a secondary tenant

Open
#110,014 0 comments 0 reactions 0 assignees View on GitHub
C-bug
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Found while investigating #110001.

**Describe the problem**

When `TestProtectedTimestampsPreventGC` is modified to point to a secondary tenant (e.g. via #110008), the following sub-case fails:

```
=== RUN TestProtectedTimestampsPreventGC/deprecated-pts-applies
gc_protected_timestamp_test.go:214:
Error Trace: github.com/cockroachdb/cockroach/pkg/sql/gcjob/gc_protected_timestamp_test.go:214
Error: Not equal:
expected: true
actual : false
Test: TestProtectedTimestampsPreventGC/deprecated-pts-applies
```

**To Reproduce**

Get #110008 and remove the annotation `failsWithSecondaryTenant` then run with a secondary tenant enabled.

**Expected behavior**

The test should be agnostic of whether there is a secondary tenant or not.

(If my understanding of the code is right, there is some kind of execption in `isProtected` for the system tenant. I wonder if that should be exercised as a special-purpose test instead of having the generic code in TestProtectedTimestampsPreventGC do it.)

Epic: CRDB-26687

Jira issue: CRDB-31222

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.