Skip to content

Found empty schema diff in the non-latest schema version #8578

Closed
@JaySon-Huang

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

fullstack-test2-logs.tar.gz

Related logging in TiFlash:

  1. TiFlash try to sync the schema diff in (258, 266]
  2. SchemaDiff with 259 is update tiflash replica status, apply done
  3. SchemaDiff with 260 is empty, but it is not expected.
[2023/12/22 21:42:37.322 +08:00] [INFO] [TiDBSchemaSyncer.cpp:73] ["Start to sync schemas. current version is: 258 and try to sync schema version to: 266"] [source="keyspace=4294967295"] [thread_id=302]
[2023/12/22 21:42:37.322 +08:00] [TRACE] [SchemaGetter.cpp:256] ["Get SchemaDiff from TiKV, schema_version=259 data={\"version\":259,\"type\":31,\"schema_id\":2,\"table_id\":295,\"old_table_id\":0,\"old_schema_id\":0,\"regenerate_schema_map\":false,\"affected_options\":null}"] [thread_id=302]
[2023/12/22 21:42:37.323 +08:00] [TRACE] [SchemaBuilder.cpp:246] ["applyDiff accept type=UpdateTiFlashReplicaStatus"] [source="keyspace=4294967295"] [thread_id=302]
[2023/12/22 21:42:37.323 +08:00] [WARN] [SchemaGetter.cpp:300] ["The table is dropped in TiKV, try to get the latest table_info, table_id=295"] [thread_id=302]
[2023/12/22 21:42:37.324 +08:00] [DEBUG] [SchemaGetter.cpp:313] ["Get Table Info from TiKV, table_id=295 {...}"] [thread_id=302]
[2023/12/22 21:42:37.333 +08:00] [DEBUG] [StorageDeltaMerge.cpp:1523] ["Update table_info: {...}"] [source=db_2.t_296] [thread_id=302]
[2023/12/22 21:42:37.340 +08:00] [INFO] [SchemaBuilder.cpp:458] ["Updating replica info, replica count old=1 new=1 available=optional(true) physical_table_id=296 logical_table_id=295"] [source="keyspace=4294967295"] [thread_id=302]
[2023/12/22 21:42:37.344 +08:00] [DEBUG] [StorageDeltaMerge.cpp:1523] ["Update table_info: {...}"] [source=db_2.t_297] [thread_id=302]
[2023/12/22 21:42:37.351 +08:00] [INFO] [SchemaBuilder.cpp:458] ["Updating replica info, replica count old=1 new=1 available=optional(true) physical_table_id=297 logical_table_id=295"] [source="keyspace=4294967295"] [thread_id=302]
[2023/12/22 21:42:37.357 +08:00] [DEBUG] [StorageDeltaMerge.cpp:1523] ["Update table_info: {...}"] [source=db_2.t_295] [thread_id=302]
[2023/12/22 21:42:37.357 +08:00] [INFO] [StorageDeltaMerge.cpp:128] ["updateTableColumnInfo, table_name=t_295 ordinary=..."] [source=db_2.t_295] [thread_id=302]
[2023/12/22 21:42:37.364 +08:00] [INFO] [SchemaBuilder.cpp:484] ["Updating replica info, replica count old=1 new=1 available=optional(true) physical_table_id=295 logical_table_id=295"] [source="keyspace=4294967295"] [thread_id=302]
[2023/12/22 21:42:37.365 +08:00] [WARN] [SchemaGetter.cpp:253] ["The schema diff is empty, schema_version=260 key=Diff:260"] [thread_id=302]
[2023/12/22 21:42:37.367 +08:00] [ERROR] [BaseDaemon.cpp:367] [########################################] [source=BaseDaemon] [thread_id=1157]
[2023/12/22 21:42:37.367 +08:00] [ERROR] [BaseDaemon.cpp:368] ["(from thread 302) Received signal Aborted(6)."] [source=BaseDaemon] [thread_id=1157]
[2023/12/22 21:42:37.460 +08:00] [ERROR] [BaseDaemon.cpp:560] ["\n       0xc6fd95b\tfaultSignalHandler(int, siginfo_t*, void*) [tiflash+208656731]\n  0x7fbca4ee9630\t<unknown symbol> [libpthread.so.0+63024]\n  0x7fbca4728387\tgsignal [libc.so.6+222087]\n  0x7fbca4729a78\t__GI_abort [libc.so.6+227960]\n  0x7fbcb188566f\tstd::__1::__libcpp_abort_debug_function(std::__1::__libcpp_debug_info const&) [libc++.so.1+464495]\n       0xdf05366\tstd::__1::optional<DB::SchemaDiff>::operator->() [tiflash+233853798]\n       0xdf05025\tDB::TiDBSchemaSyncer<false, false>::syncSchemaDiffs(DB::Context&, DB::SchemaGetter&, long) [tiflash+233852965]\n       0xdf03709\tDB::TiDBSchemaSyncer<false, false>::syncSchemasByGetter(DB::Context&, DB::SchemaGetter&) [tiflash+233846537]\n       0xdf043b1\tDB::TiDBSchemaSyncer<false, false>::syncTableSchema(DB::Context&, long) [tiflash+233849777]\n       0xc9f1fb8\tDB::TiDBSchemaSyncerManager::syncTableSchema(DB::Context&, unsigned int, long) [tiflash+211754936]\n       0xe9bc27b\tDB::AtomicGetStorageSchema(std::__1::shared_ptr<DB::Region> const&, DB::TMTContext&) [tiflash+245088891]\n       0xe8b8d20\tDB::KVStore::preHandleSSTsToDTFiles(std::__1::shared_ptr<DB::Region>, DB::SSTViewVec, unsigned long, unsigned long, DB::DM::FileConvertJobType, DB::TMTContext&) [tiflash+244026656]\n       0xe8b85f3\tDB::KVStore::preHandleSnapshotToFiles(std::__1::shared_ptr<DB::Region>, DB::SSTViewVec, unsigned long, unsigned long, std::__1::optional<unsigned long>, DB::TMTContext&) [tiflash+244024819]\n       0xe8898d1\tPreHandleSnapshot [tiflash+243833041]\n  0x7fbcae58e736\tproxy_ffi::engine_store_helper_impls::_$LT$impl$u20$proxy_ffi..interfaces..root..DB..EngineStoreServerHelper$GT$::pre_handle_snapshot::h840d9ed14f09a65e [libtiflash_proxy.so+150529846]\n  0x7fbcae502dfd\tengine_store_ffi::core::forward_raft::snapshot::pre_handle_snapshot_impl::h61aa39310c31a62e [libtiflash_proxy.so+149958141]\n  0x7fbcab8c0dc0\tengine_store_ffi::core::forward_raft::snapshot::_$LT$impl$u20$engine_store_ffi..core..forwarder..ProxyForwarder$LT$T$C$ER$GT$$GT$::pre_apply_snapshot::_$u7b$$u7b$closure$u7d$$u7d$::h2f5ffc9e49c879e8 [libtiflash_proxy.so+103550400]\n  0x7fbcaa772ab2\t_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h09a365f0be04fce9 [libtiflash_proxy.so+85404338]\n  0x7fbcaab1a639\tyatp::task::future::RawTask$LT$F$GT$::poll::h86e08f0661bfeb04 [libtiflash_proxy.so+89237049]\n  0x7fbcaf99307e\tyatp::task::future::TaskCell::poll::hbbb766a97468e2df [libtiflash_proxy.so+171520126]\n  0x7fbcaf993e34\t_$LT$yatp..task..future..Runner$u20$as$u20$yatp..pool..runner..Runner$GT$::handle::h3c329648fd40d6ed [libtiflash_proxy.so+171523636]\n  0x7fbcaf98e503\tyatp::pool::worker::WorkerThread$LT$T$C$R$GT$::run::hd8dbb26e2d7bf247 [libtiflash_proxy.so+171500803]\n  0x7fbcaf95521d\tyatp::pool::builder::LazyBuilder$LT$T$GT$::build::_$u7b$$u7b$closure$u7d$$u7d$::h514ea08a6145fb22 [libtiflash_proxy.so+171266589]\n  0x7fbcaf9499ac\tstd::sys_common::backtrace::__rust_begin_short_backtrace::h077f138196384345 [libtiflash_proxy.so+171219372]\n  0x7fbcaf9813dd\tstd::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb9a4f6f6f0cd6ab0 [libtiflash_proxy.so+171447261]\n  0x7fbcaf958371\t_$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h5b4b03ee84d96aa4 [libtiflash_proxy.so+171279217]\n  0x7fbcaf981606\tstd::panicking::try::do_call::h825e38935db99a94 [libtiflash_proxy.so+171447814]\n  0x7fbcaf9948cb\t__rust_try [libtiflash_proxy.so+171526347]\n  0x7fbcaf98152f\tstd::panicking::try::hcf8a41405db4db12 [libtiflash_proxy.so+171447599]\n  0x7fbcaf97f9e1\tstd::panic::catch_unwind::h96e08252e1e218de [libtiflash_proxy.so+171440609]\n  0x7fbcaf9811aa\tstd::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h1aaaf3ff102ab795 [libtiflash_proxy.so+171446698]\n  0x7fbcaf982f77\tcore::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h9122f2f9f9bffe80 [libtiflash_proxy.so+171454327]\n  0x7fbcb0eebf93\tstd::sys::unix::thread::Thread::new::thread_start::hd2791a9cabec1fda [libtiflash_proxy.so+193904531]\n                \t/rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/sys/unix/thread.rs:108\n  0x7fbca4ee1ea5\tstart_thread [libpthread.so.0+32421]"] [source=BaseDaemon] [thread_id=1157]

4. What is your TiFlash version? (Required)

master

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions