diff --git a/pkg/sql/drop_test.go b/pkg/sql/drop_test.go index 285470ac2bd3..19581f8e8ca4 100644 --- a/pkg/sql/drop_test.go +++ b/pkg/sql/drop_test.go @@ -417,6 +417,14 @@ func TestDropIndex(t *testing.T) { s, sqlDB, kvDB := serverutils.StartServer(t, params) defer s.Stopper().Stop(context.Background()) + _, err := sqlDB.Exec(`SET CLUSTER SETTING sql.gc_job.wait_for_gc.interval = '1s';`) + require.NoError(t, err) + + // Refresh protected timestamp cache immediately to make MVCC GC queue to + // process GC immediately. + _, err = sqlDB.Exec(`SET CLUSTER SETTING kv.protectedts.poll_interval = '1s';`) + require.NoError(t, err) + // Disable strict GC TTL enforcement because we're going to shove a zero-value // TTL into the system with AddImmediateGCZoneConfig. defer sqltestutils.DisableGCTTLStrictEnforcement(t, sqlDB)() @@ -426,6 +434,9 @@ func TestDropIndex(t *testing.T) { t.Fatal(err) } tableDesc := desctestutils.TestingGetPublicTableDescriptor(kvDB, keys.SystemSQLCodec, "t", "kv") + if _, err := sqltestutils.AddImmediateGCZoneConfig(sqlDB, tableDesc.GetID()); err != nil { + t.Fatal(err) + } tests.CheckKeyCount(t, kvDB, tableDesc.TableSpan(keys.SystemSQLCodec), 3*numRows) idx, err := catalog.MustFindIndexByName(tableDesc, "foo") if err != nil { diff --git a/pkg/sql/schemachanger/scexec/gc_jobs.go b/pkg/sql/schemachanger/scexec/gc_jobs.go index 226746b978a3..f32854cfb227 100644 --- a/pkg/sql/schemachanger/scexec/gc_jobs.go +++ b/pkg/sql/schemachanger/scexec/gc_jobs.go @@ -233,7 +233,6 @@ func createGCJobRecord( descriptorIDs = append(descriptorIDs, details.ParentID) } } - runningStatus := jobs.RunningStatus("waiting for MVCC GC") return jobs.Record{ JobID: id, Description: "GC for " + description, @@ -241,7 +240,6 @@ func createGCJobRecord( DescriptorIDs: descriptorIDs, Details: details, Progress: jobspb.SchemaChangeGCProgress{}, - RunningStatus: runningStatus, NonCancelable: true, } }