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

Failed to find memtable to write for schema mismatch #308

Closed
ShiKaiWi opened this issue Oct 17, 2022 · 0 comments · Fixed by #966
Closed

Failed to find memtable to write for schema mismatch #308

ShiKaiWi opened this issue Oct 17, 2022 · 0 comments · Fixed by #966
Assignees
Labels
bug Something isn't working

Comments

@ShiKaiWi
Copy link
Member

Describe this problem

Panic with the stacktrace:

2022-10-17 11:04:48.036 ERRO [analytic_engine/src/instance/write.rs:246] Failed to write to memtable, table:SPM_241044197_INFLUENCE_DEFAULT, table_id:7696581400551, err:Failed to find mutable memtable, table:SPM_241044197_INFLUENCE_DEFAULT, err:Failed to find memtable for write, 
err:Schema mismatch, memtable_version:1, given:2.
Backtrace:
 0 <snafu::backtrace_shim::Backtrace as snafu::GenerateBacktrace>::generate::h3f52f317135a785b
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/table/version.rs:41
   analytic_engine::table::version::SchemaMismatch<__T0,__T1>::build::hec315d78c29a32f9
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/table/version.rs:41
   analytic_engine::table::version::SchemaMismatch<__T0,__T1>::fail::h55958999369fc666
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/table/version.rs:41
   analytic_engine::table::version::TableVersion::memtable_for_write::h489b8f0b6fd929fc
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/table/version.rs:636
 1 analytic_engine::table::data::TableData::find_or_create_mutable::h8df5a6e0e2779f2d
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/table/data.rs:328
 2 analytic_engine::instance::write::<impl analytic_engine::instance::Instance>::write_to_memtable::h177e7f4f900933fc
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/instance/write.rs:469
 3 analytic_engine::instance::write::<impl analytic_engine::instance::Instance>::process_write_table_command::{{closure}}::hb0450cd24573eacb
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/instance/write.rs:238
   <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8d6ec5f0357f4395
   /rustc/d394408fb38c4de61f765a3ed5189d2731a1da91/library/core/src/future/mod.rs:91
 4 analytic_engine::instance::write_worker::WriteWorker::handle_write_table::{{closure}}::h00ab49ddce0baa9c
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/instance/write_worker.rs:810
   <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h83fdda7c55aeac42
   /rustc/d394408fb38c4de61f765a3ed5189d2731a1da91/library/core/src/future/mod.rs:91
   analytic_engine::instance::write_worker::WriteWorker::run::{{closure}}::h93d0aa56457bd0c4
   /home/chunshao.rcs/github/CeresDB/ceresdb/analytic_engine/src/instance/write_worker.rs:750
 5 <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb661b1497c326a5a
   /rustc/d394408fb38c4de61f765a3ed5189d2731a1da91/library/core/src/future/mod.rs:91
   analytic_engine::instance::write_wo

Steps to reproduce

Have no idea about how to reproduce this panic now.

Expected behavior

Won't fail.

Additional Information

No response

@ShiKaiWi ShiKaiWi added the bug Something isn't working label Oct 17, 2022
jiacai2050 added a commit that referenced this issue Jun 9, 2023
## Rationale
Close #308 

## Detailed Changes


## Test Plan
This is a corner case between write and alter schema, the testcase is
not easy to construct, so we plan to test this in test env first, then
add tests later.

---------

Co-authored-by: jiacai2050 <dev@liujiacai.net>
dust1 pushed a commit to dust1/ceresdb that referenced this issue Aug 9, 2023
## Rationale
Close apache#308 

## Detailed Changes


## Test Plan
This is a corner case between write and alter schema, the testcase is
not easy to construct, so we plan to test this in test env first, then
add tests later.

---------

Co-authored-by: jiacai2050 <dev@liujiacai.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant