Skip to content

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

@knz

Description

@knz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions