Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logictest: alter_table logictest is flaky #76911

Closed
adityamaru opened this issue Feb 22, 2022 · 2 comments · Fixed by #77176
Closed

logictest: alter_table logictest is flaky #76911

adityamaru opened this issue Feb 22, 2022 · 2 comments · Fixed by #77176
Assignees
Labels
A-disaster-recovery C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-disaster-recovery

Comments

@adityamaru
Copy link
Contributor

=== CONT  TestLogic/fakedist/alter_table
    logic.go:2498: 
         
        /go/src/github.com/cockroachdb/cockroach/pkg/sql/logictest/testdata/logic_test/alter_table:86: SELECT job_type, regexp_replace(description, 'JOB \d+', 'JOB ...'), user_name, fraction_completed::decimal(10,2)
        FROM crdb_internal.jobs
        WHERE job_type = 'SCHEMA CHANGE' OR job_type = 'SCHEMA CHANGE GC'
        ORDER BY created DESC
        LIMIT 3
        expected:
            SCHEMA CHANGE GC  GC for temporary index used during index backfill                           root  0.00
            SCHEMA CHANGE GC  GC for ROLLBACK of ALTER TABLE test.public.t ADD CONSTRAINT bar UNIQUE (c)  root  0.00
            SCHEMA CHANGE     ALTER TABLE test.public.t ADD CONSTRAINT bar UNIQUE (c)                     root  0.00
            
        but found (query options: "") :
            SCHEMA CHANGE GC  GC for temporary index used during index backfill                           root  1.00
            SCHEMA CHANGE GC  GC for ROLLBACK of ALTER TABLE test.public.t ADD CONSTRAINT bar UNIQUE (c)  root  0.00
            SCHEMA CHANGE     ALTER TABLE test.public.t ADD CONSTRAINT bar UNIQUE (c)                     root  0.00

Seen on https://teamcity.cockroachdb.com/viewLog.html?buildId=4434087&buildTypeId=Cockroach_UnitTests

@adityamaru adityamaru added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Feb 22, 2022
@blathers-crl
Copy link

blathers-crl bot commented Feb 22, 2022

cc @cockroachdb/bulk-io

@adityamaru adityamaru changed the title logictest: alter_table logictest is flakey logictest: alter_table logictest is flaky Feb 22, 2022
@adityamaru
Copy link
Contributor Author

Haven't had a chance to verify that this actually flakes regularly, but thought I'd capture it since I saw it on my bors batch.

craig bot pushed a commit that referenced this issue Mar 1, 2022
77111: ccl/sqlproxyccl: handle implicit auth in OpenTenantConnWithToken r=JeffSwenson a=jaylim-crl

Informs #76000. Extracted from #76805.

Previously, we assumed that with the token-based authentication, the server is
ready to accept queries the moment we connect to it. This assumption has been
proved wrong during the integration tests with the forwarder, and there's
an implicit AuthenticateOK step that happens after connecting to the server.
During that time, initial connection data such as ParameterStatus and
BackendKeyData messages will be sent to the client as well. For now, we will
ignore those messages. Once we start implementing query cancellation within
the proxy, that has to be updated to cache the new BackendKeyData.

This commit also fixes a buglet to handle pgwire messages with no body.
pgproto3's Receive methods will still call Next if the body size is 0, and
previously, we were returning an io.EOF error. This commit changes that
behavior to return an empty slice.

Release note: None

Release justification: This fixes two buglets: one that was introduced when we
added token-based authentication support to the proxy in #76417, and another
when we added the interceptors. This is low risk as part of the code is
guarded behind the connection migration feature, which is currently not being
used in production. To add on, CockroachCloud is the only user of sqlproxy.

77176: logictest: fix flakey alter_table r=ajwerner a=ajwerner

The GC job for the temp index runs immediately so the fraction might be 1.

Fixes #76911.

Release justification: non-production code change

Release note: None

Co-authored-by: Jay <[email protected]>
Co-authored-by: Andrew Werner <[email protected]>
@craig craig bot closed this as completed in 287df04 Mar 1, 2022
RajivTS pushed a commit to RajivTS/cockroach that referenced this issue Mar 6, 2022
The GC job for the temp index runs immediately so the fraction might be 1.

Fixes cockroachdb#76911.

Release justification: non-production code change

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-disaster-recovery C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-disaster-recovery
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants