-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kv: TestProposalNotAcknowledgedOrReproposedAfterApplication is fooling itself, skipped #71148
Description
This test is trying to probabilistically verify something about reproposals. The way in which it tries to verify it is broken - it's using enableTraceDebugUseAfterFree() to get net/trace to log a message in case of use-after-finish of a net.Trace, and then it tries to use tracing to see if that condition triggers. Our tracing by default does not use net/trace, though, so the test is fooling itself.
I've verified that the test doesn't fail when I comment out the code that it relies on:
cockroach/pkg/kv/kvserver/replica_application_state_machine.go
Lines 1228 to 1232 in 793b4c8
| if higherReproposalsExist { | |
| sm.r.mu.Lock() | |
| delete(sm.r.mu.proposals, cmd.idKey) | |
| sm.r.mu.Unlock() | |
| } |
The test does fail under stress if I make the trace.debug.enable cluster setting default to true.
Rather than having the test use that setting, I'd like to request we find another way for the test to check what it wants. The current approach is too fragile. I recognize that it might not be an easy test to write; perhaps it can be replaced with a lower-level unit test.
I thought about deleting the test completely, but no other test in kvserver seems sensitive to the commenting out of the lines above. So I think we probably do need a test here.
cc @tbg @ajwerner @nvanbenschoten
Jira issue: CRDB-10415
Epic CRDB-25287