diff --git a/DEPS.bzl b/DEPS.bzl index 8b135b1be562..7f8001cd27bf 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -2445,11 +2445,9 @@ def go_deps(): name = "com_github_dataexmachina_dev_side_eye_go", build_file_proto_mode = "disable_global", importpath = "github.com/DataExMachina-dev/side-eye-go", - sha256 = "ea5676af6abb1965ba70c24a9090932c9e45a002411e9c86298f60f60f16a10a", - strip_prefix = "github.com/DataExMachina-dev/side-eye-go@v0.0.0-20250102012104-645b45402adf", - urls = [ - "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/DataExMachina-dev/side-eye-go/com_github_dataexmachina_dev_side_eye_go-v0.0.0-20250102012104-645b45402adf.zip", - ], + vcs = "git", + remote = "https://github.com/DataExMachina-dev/side-eye-go", + commit = "98a5d15ddf3990000fad7b2756b56dfa3711c35b", ) go_repository( name = "com_github_dave_dst", diff --git a/pkg/ccl/changefeedccl/cdcevent/BUILD.bazel b/pkg/ccl/changefeedccl/cdcevent/BUILD.bazel index 0d2582c6cef4..073436edc95e 100644 --- a/pkg/ccl/changefeedccl/cdcevent/BUILD.bazel +++ b/pkg/ccl/changefeedccl/cdcevent/BUILD.bazel @@ -34,6 +34,7 @@ go_library( "//pkg/sql/sem/tree", "//pkg/sql/sessiondatapb", "//pkg/sql/types", + "//pkg/testutils", "//pkg/util", "//pkg/util/cache", "//pkg/util/encoding", diff --git a/pkg/ccl/changefeedccl/cdcevent/event.go b/pkg/ccl/changefeedccl/cdcevent/event.go index 9d0110574754..87b44c9c75ba 100644 --- a/pkg/ccl/changefeedccl/cdcevent/event.go +++ b/pkg/ccl/changefeedccl/cdcevent/event.go @@ -25,6 +25,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sessiondatapb" "github.com/cockroachdb/cockroach/pkg/sql/types" + "github.com/cockroachdb/cockroach/pkg/testutils" "github.com/cockroachdb/cockroach/pkg/util/cache" "github.com/cockroachdb/cockroach/pkg/util/hlc" "github.com/cockroachdb/cockroach/pkg/util/iterutil" @@ -545,6 +546,15 @@ func (d *eventDecoder) DecodeKV( return Row{}, err } + testutils.CaptureSideEyeSnapshotNoT(context.TODO(), "decodekv") + // _ = testutils.CaptureSideEyeSnapshotNoT + // runtime.Breakpoint() + + // r, err = d.decodeKV(ctx, kv, rt, schemaTS, keyOnly) + // if err == nil { + // return r, nil + // } + // Failure to decode roachpb.KeyValue we received from rangefeed is pretty bad. // At this point, we only have guesses why this happened (schema change? data corruption?). // Retrying this error however is likely to produce exactly the same result. diff --git a/pkg/ccl/changefeedccl/nemeses_test.go b/pkg/ccl/changefeedccl/nemeses_test.go index 3386784cf7c7..a13ae3ed1533 100644 --- a/pkg/ccl/changefeedccl/nemeses_test.go +++ b/pkg/ccl/changefeedccl/nemeses_test.go @@ -24,41 +24,45 @@ func TestChangefeedNemeses(t *testing.T) { defer log.Scope(t).Close(t) skip.UnderRace(t, "takes >1 min under race") - testutils.RunValues(t, "nemeses_options=", cdctest.NemesesOptions, func(t *testing.T, nop cdctest.NemesesOption) { - if nop.EnableSQLSmith == true { - skip.WithIssue(t, 137125) - } - testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) { - rng, seed := randutil.NewPseudoRand() - t.Logf("random seed: %d", seed) + for { + testutils.RunValues(t, "nemeses_options=", cdctest.NemesesOptions, func(t *testing.T, nop cdctest.NemesesOption) { + nop.EnableSQLSmith = true + // if nop.EnableSQLSmith == true { + // skip.WithIssue(t, 137125) + // } + testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) { + rng, seed := randutil.NewPseudoRand() + t.Logf("random seed: %d", seed) - sqlDB := sqlutils.MakeSQLRunner(s.DB) - withLegacySchemaChanger := maybeDisableDeclarativeSchemaChangesForTest(t, sqlDB) + sqlDB := sqlutils.MakeSQLRunner(s.DB) + withLegacySchemaChanger := maybeDisableDeclarativeSchemaChangesForTest(t, sqlDB) + withLegacySchemaChanger = false - v, err := cdctest.RunNemesis(f, s.DB, t.Name(), withLegacySchemaChanger, rng, nop) + v, err := cdctest.RunNemesis(f, s.DB, t.Name(), withLegacySchemaChanger, rng, nop) + if err != nil { + t.Fatalf("%+v", err) + } + for _, failure := range v.Failures() { + t.Error(failure) + } + } + + // Tenant tests disabled because ALTER TABLE .. SPLIT is not + // supported with cluster virtualization: + // + // nemeses_test.go:39: pq: unimplemented: operation is unsupported inside virtual clusters + // + // TODO(knz): This seems incorrect, see issue #109417. + cdcTest(t, testFn, feedTestNoTenants) + log.FlushFiles() + entries, err := log.FetchEntriesFromFiles(0, math.MaxInt64, 1, + regexp.MustCompile("cdc ux violation"), log.WithFlattenedSensitiveData) if err != nil { - t.Fatalf("%+v", err) + t.Fatal(err) } - for _, failure := range v.Failures() { - t.Error(failure) + if len(entries) > 0 { + t.Fatalf("Found violation of CDC's guarantees: %v", entries) } - } - - // Tenant tests disabled because ALTER TABLE .. SPLIT is not - // supported with cluster virtualization: - // - // nemeses_test.go:39: pq: unimplemented: operation is unsupported inside virtual clusters - // - // TODO(knz): This seems incorrect, see issue #109417. - cdcTest(t, testFn, feedTestNoTenants) - log.FlushFiles() - entries, err := log.FetchEntriesFromFiles(0, math.MaxInt64, 1, - regexp.MustCompile("cdc ux violation"), log.WithFlattenedSensitiveData) - if err != nil { - t.Fatal(err) - } - if len(entries) > 0 { - t.Fatalf("Found violation of CDC's guarantees: %v", entries) - } - }) + }) + } } diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go index 85c5241dba0f..3b038c430e7a 100644 --- a/pkg/storage/pebble.go +++ b/pkg/storage/pebble.go @@ -1225,7 +1225,7 @@ func (p *Pebble) makeMetricEtcEventListener(ctx context.Context) pebble.EventLis }, DiskSlow: func(info pebble.DiskSlowInfo) { maxSyncDuration := fs.MaxSyncDuration.Get(&p.cfg.settings.SV) - fatalOnExceeded := fs.MaxSyncDurationFatalOnExceeded.Get(&p.cfg.settings.SV) + fatalOnExceeded := false // fs.MaxSyncDurationFatalOnExceeded.Get(&p.cfg.settings.SV) if info.Duration.Seconds() >= maxSyncDuration.Seconds() { atomic.AddInt64(&p.diskStallCount, 1) // Note that the below log messages go to the main cockroach log, not diff --git a/pkg/testutils/sideeye.go b/pkg/testutils/sideeye.go index fbc66d958b86..4fceb2028f5f 100644 --- a/pkg/testutils/sideeye.go +++ b/pkg/testutils/sideeye.go @@ -21,6 +21,49 @@ type testingT interface { TestFatalerLogger } +type fakeT struct { + name string +} + +// Errorf implements testingT. +func (f *fakeT) Errorf(format string, args ...interface{}) { + fmt.Printf(format, args...) +} + +// FailNow implements testingT. +func (f *fakeT) FailNow() { + panic("unimplemented") +} + +// Fatal implements testingT. +func (f *fakeT) Fatal(args ...interface{}) { + panic("unimplemented") +} + +// Fatalf implements testingT. +func (f *fakeT) Fatalf(format string, args ...interface{}) { + panic("unimplemented") +} + +// Helper implements testingT. +func (f *fakeT) Helper() { +} + +// Logf implements testingT. +func (f *fakeT) Logf(format string, args ...interface{}) { + fmt.Printf(format, args...) +} + +func (f *fakeT) Name() string { + return f.name +} + +var _ testingT = &fakeT{} + +func CaptureSideEyeSnapshotNoT(ctx context.Context, name string) { + CaptureSideEyeSnapshot(ctx, &fakeT{name: name}) +} + // CaptureSideEyeSnapshot captures a Side-Eye snapshot if the // SIDE_EYE_TOKEN env var is set. If the snapshot is captured, the snapshot's // URL is logged. Snapshots are captured with a 90s timeout. @@ -47,7 +90,7 @@ func CaptureSideEyeSnapshot(ctx context.Context, t testingT) { name = fmt.Sprintf("%s@%s: %s", username, hostname, name) snapshotCtx, cancel := context.WithTimeoutCause( - ctx, 90*time.Second, errors.New("timed out waiting for Side-Eye snapshot"), + ctx, 180*time.Second, errors.New("timed out waiting for Side-Eye snapshot"), ) defer cancel() snapshotURL, err := sideeye.CaptureSelfSnapshot(snapshotCtx, name, sideeye.WithEnvironment("unit tests")) diff --git a/pkg/util/buildutil/crdb_test_off.go b/pkg/util/buildutil/crdb_test_off.go index b69db643db10..c8777011419b 100644 --- a/pkg/util/buildutil/crdb_test_off.go +++ b/pkg/util/buildutil/crdb_test_off.go @@ -14,4 +14,4 @@ package buildutil // flag can be used to enable expensive checks, test randomizations, or other // metamorphic-style perturbations that will not affect test results but will // exercise different parts of the code. -const CrdbTestBuild = false +const CrdbTestBuild = true diff --git a/pkg/util/log/flags.go b/pkg/util/log/flags.go index cb088cfc11fb..58323fd56461 100644 --- a/pkg/util/log/flags.go +++ b/pkg/util/log/flags.go @@ -331,7 +331,7 @@ func ApplyConfig( if err != nil { return nil, err } - fileSink.fatalOnLogStall = fatalOnLogStall + fileSink.fatalOnLogStall = func() bool { return false } attachBufferWrapper(fileSinkInfo, fc.CommonSinkConfig.Buffering, closer) attachSinkInfo(fileSinkInfo, &fc.Channels)