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

Errors: context cancelled or context deadline exceeded are exposed as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown' #12885

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

ptabor
Copy link
Contributor

@ptabor ptabor commented Apr 22, 2021

The reason for this PR are test flakes like: https://travis-ci.com/github/etcd-io/etcd/jobs/500367259

    logger.go:130: 2021-04-22T07:56:30.190Z	WARN	m0	apply request took too long	{"member": "m0", "took": "898.215659ms", "expected-duration": "100ms", "prefix": "read-only range ", "request": "key:\"a\" ", "response": "", "error": "context deadline exceeded"}
    logger.go:130: 2021-04-22T07:56:30.190Z	INFO	m0	trace[566305530] range	{"member": "m0", "detail": "{range_begin:a; range_end:; }", "duration": "898.32003ms", "start": "2021-04-22T07:56:29.292Z", "end": "2021-04-22T07:56:30.190Z", "steps": ["trace[566305530] 'agreement among raft nodes before linearized reading'  (duration: 898.212117ms)"], "step_count": 1}
    logger.go:130: 2021-04-22T07:56:30.190Z	WARN	m0	request stats	{"member": "m0", "start time": "2021-04-22T07:56:29.292Z", "time spent": "898.37779ms", "remote": "@", "response type": "/etcdserverpb.KV/Range", "request count": 0, "request size": 3, "response count": 0, "response size": 0, "request content": "key:\"a\" "}
    network_partition_test.go:140: Op returned error: rpc error: code = Unknown desc = context deadline exceeded
    network_partition_test.go:141: Cancelling...
    network_partition_test.go:147: #0: expected 'expected error', got 'rpc error: code = Unknown desc = context deadline exceeded'

…d as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown'
@ptabor ptabor force-pushed the 20210422-error-codes-context branch from c501102 to 9a4b2bd Compare April 22, 2021 12:35
@ptabor ptabor merged commit bd4f8e2 into etcd-io:master Apr 22, 2021
@ptabor ptabor deleted the 20210422-error-codes-context branch April 22, 2021 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants