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

[flay test] test_rawkv::test_leader_transfer #16789

Closed
tonyxuqqi opened this issue Apr 9, 2024 · 2 comments · Fixed by #16827
Closed

[flay test] test_rawkv::test_leader_transfer #16789

tonyxuqqi opened this issue Apr 9, 2024 · 2 comments · Fixed by #16827
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. flaky_test The test case is unstable severity/minor type/bug The issue is confirmed as a bug.

Comments

@tonyxuqqi
Copy link
Contributor

https://ci.pingcap.net/blue/organizations/jenkins/tikv_ghpr_test/detail/tikv_ghpr_test/43640/tests/

Stacktrace
thread 'cases::test_rawkv::test_leader_transfer' panicked at '', components/test_raftstore/src/util.rs:1422:5
stack backtrace:
0: rust_begin_unwind
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:65:14
2: test_raftstore::util::must_raw_put
3: failpoints::cases::test_rawkv::TestSuite::must_raw_put
at /home/jenkins/tikv-src/tests/failpoints/cases/test_rawkv.rs:65:9
4: failpoints::cases::test_rawkv::test_leader_transfer
at /home/jenkins/tikv-src/tests/failpoints/cases/test_rawkv.rs:196:9
5: failpoints::cases::test_rawkv::test_leader_transfer::{{closure}}
at /home/jenkins/tikv-src/tests/failpoints/cases/test_rawkv.rs:153:27
6: core::ops::function::FnOnce::call_once
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/ops/function.rs:513:5
7: test_util::runner::run_test_with_hook::{{closure}}::{{closure}}
8: core::ops::function::FnOnce::call_once{{vtable.shim}}
9: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/boxed.rs:2000:9
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

@tonyxuqqi tonyxuqqi added the flaky_test The test case is unstable label Apr 9, 2024
@pingyu
Copy link
Contributor

pingyu commented Apr 10, 2024

'cases::test_rawkv::test_leader_transfer' panicked at ''

It's strange that must_raw_put met a region error but it was empty. As there is no tikv logs in CI, currently I don't know what is the error and where it raised.

Maybe we should try to package tikv logs in CI first.

@pingyu
Copy link
Contributor

pingyu commented Apr 13, 2024

After add some debug logs in future_raw_put:

    async move {
        let v = match res {
            Err(e) => {
                error!("[debug] raw_put"; "e" => ?e);
                Err(e)
            }
            Ok(_) => f.await?,
        };
        info!("[debug] raw_put"; "v" => ?v);
        let mut resp = RawPutResponse::default();
        if let Some(err) = extract_region_error(&v) {
            error!("[debug] raw_put"; "err" => ?err);
            resp.set_region_error(err);
        } else if let Err(e) = v {
            resp.set_error(format!("{}", e));
        }
        Ok(resp)
    }

It shows that it's a error of MaxTimestampNotSynced:

test_region_merge-0 2024/04/13 17:39:57.625 kv.rs:1926: [INFO] [debug] raw_put, v: Err(Error(Txn(Error(MaxTimestampNotSynced { region_id: 1004, start_ts: TimeStamp(0) })))), thread_id: 863
test_region_merge-0 2024/04/13 17:39:57.625 kv.rs:1929: [ERRO] [debug] raw_put, err: , thread_id: 863

@pingyu pingyu added type/bug The issue is confirmed as a bug. severity/minor labels Apr 13, 2024
ti-chi-bot bot added a commit that referenced this issue Apr 16, 2024
close #16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Apr 16, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Apr 16, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Apr 16, 2024
@glorv glorv added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Jul 17, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jul 17, 2024
…16847)

close #16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: Ping Yu <[email protected]>
Co-authored-by: glorv <[email protected]>
ti-chi-bot bot added a commit that referenced this issue Jul 18, 2024
…16846)

close #16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: Ping Yu <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this issue Jul 18, 2024
…16844)

close #16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: Ping Yu <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this issue Jul 18, 2024
…16845)

close #16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: Ping Yu <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
RidRisR pushed a commit to RidRisR/tikv that referenced this issue Aug 5, 2024
tikv#16847)

close tikv#16789

Add RawKvMaxTimestampNotSynced error and set message to errorpb.Error.max_ts_not_synced to provide more information.
Retry on max_ts_not_synced error for must_raw_put.

Signed-off-by: Ping Yu <[email protected]>

Co-authored-by: Ping Yu <[email protected]>
Co-authored-by: glorv <[email protected]>
Signed-off-by: RidRisR <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. flaky_test The test case is unstable severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants