sql,distsql: alter_table logic test failure with fake span resolver #13646
Closed
Description
I am trying to make logic tests to run with DistSQL + fake span resolver in a 3 node testcluster.
I am seeing a failure for https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/testdata/alter_table#L477
# Adding a unique column to an existing table with data with a default value
# is illegal
statement error duplicate key value .* violates unique constraint \"add_default_f_key\"
ALTER TABLE add_default ADD f TIMESTAMP UNIQUE DEFAULT current_timestamp()
The statement doesn't hit the expected error:
$ make test PKG=./pkg/sql TESTS=LogicDistSQL//alter_table TESTFLAGS='--max-errors 10'
go test -v -tags '' -i ./pkg/sql
go test -tags '' -run "LogicDistSQL//alter_table" -timeout 2m ./pkg/sql --max-errors 10
I170217 10:12:34.204108 1 rand.go:76 Random seed: -7174852851567646062
E170217 10:12:40.569642 8779 sql/distsqlrun/server.go:202 [n1] duplicate key value (f)=('2017-02-17 15:12:40.549548+00:00') violates unique constraint "add_default_f_key"
E170217 10:12:40.650652 8785 sql/distsqlrun/server.go:202 [n1] duplicate key value (f)=('2017-02-17 15:12:40.638531+00:00') violates unique constraint "add_default_f_key"
E170217 10:12:40.805665 8931 sql/distsqlrun/server.go:202 [n1] duplicate key value (f)=('2017-02-17 15:12:40.786231+00:00') violates unique constraint "add_default_f_key"
test log files left over in: /tmp/TestLogic386323654
--- FAIL: TestLogicDistSQL (6.92s)
--- FAIL: TestLogicDistSQL/testdata/alter_table (6.91s)
logic_test.go:1485:
testdata/alter_table:479: expected "duplicate key value .* violates unique constraint \\\"add_default_f_key\\\"", but found <nil>
logic_test.go:1300:
testdata/alter_table:479: error in statement, skipping to next file
FAIL
FAIL github.com/cockroachdb/cockroach/pkg/sql 6.947s
Makefile:136: recipe for target 'test' failed
I am guessing it is the new backfiller. I have pushed a temporary branch to the repo https://github.com/cockroachdb/cockroach/tree/radu-logic-test-cluster-for-vivek that can be used to repro.