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

A bug is triggered when write and query are executed at the same time #1672

Open
bright-zy opened this issue May 17, 2024 · 2 comments
Open
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@bright-zy
Copy link

(you don't have to strictly follow this form)

Bug Report

Briefly describe the bug

执行 INSERT OVERWRITE db.table PARTITION('') SELECT ... 时, 进行 select count(*) from db.table 查询,错误发生

2024.05.17 11:03:16.104818 [ 341856 ] {047e4b99-ea7a-4871-aa38-c19e393cdfc7} (449816812282970114) <Error> executeQuery: Code: 57, e.displayText() = DB::Exception: DB::Exception: Table measure_olap.rpt_log_index_tracking_di_cube_v17_449816812282970114 already exists. SQLSTATE: 42P07.: While executing Remote SQLSTATE: 42P07 (version 21.8.7.1) (from [::ffff:10.201.69.32]:45250) (in query: select count(*) from measure_olap.rpt_log_index_tracking_di_cube_v17;), Stack trace (when copying this message, always include the lines below):

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x26f45d32 in /data1/byconity/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x105d16e0 in /data1/byconity/clickhouse
2. DB::readException(DB::ReadBuffer&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) @ 0x10642611 in /data1/byconity/clickhouse
3. DB::RPCHelpers::checkException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x2010d02b in /data1/byconity/clickhouse
4. void DB::RPCHelpers::onAsyncCallDoneWithFailedInfo<DB::Protos::SendResourcesResp>(DB::Protos::SendResourcesResp*, brpc::Controller*, std::__1::shared_ptr<DB::ExceptionHandlerWithFailedInfo>, DB::WorkerId) @ 0x1ff0b7aa in /data1/byconity/clickhouse
5. brpc::internal::FunctionClosure4<DB::Protos::SendResourcesResp*, brpc::Controller*, std::__1::shared_ptr<DB::ExceptionHandlerWithFailedInfo>, DB::WorkerId>::Run() @ 0x1ff0d521 in /data1/byconity/clickhouse
6. /build/build_docker/../contrib/incubator-brpc/src/brpc/controller.h:704: brpc::Controller::EndRPC(brpc::Controller::CompletionInfo const&) @ 0x26ca1ec9 in /data1/byconity/clickhouse
7. /build/build_docker/../contrib/incubator-brpc/src/brpc/controller.cpp:0: brpc::Controller::OnVersionedRPCReturned(brpc::Controller::CompletionInfo const&, bool, int) @ 0x26ca0a26 in /data1/byconity/clickhouse
8. /build/build_docker/../contrib/incubator-brpc/src/brpc/details/controller_private_accessor.h:0: brpc::policy::ProcessRpcResponse(brpc::InputMessageBase*) @ 0x26cc9f50 in /data1/byconity/clickhouse
9. /build/build_docker/../contrib/incubator-brpc/src/brpc/input_messenger.cpp:386: brpc::InputMessenger::OnNewMessages(brpc::Socket*) @ 0x26cc07ee in /data1/byconity/clickhouse
10. /build/build_docker/../contrib/libcxx/include/memory:1655: brpc::Socket::ProcessEvent(void*) @ 0x26df094d in /data1/byconity/clickhouse
11. /build/build_docker/../contrib/incubator-brpc/src/bthread/task_group.cpp:304: bthread::TaskGroup::task_runner(long) @ 0x26c8e44d in /data1/byconity/clickhouse

2024.05.17 11:03:16.104874 [ 341856 ] {047e4b99-ea7a-4871-aa38-c19e393cdfc7} (449816812282970114) <Error> TCPHandler: Code: 57, e.displayText() = DB::Exception: DB::Exception: Table measure_olap.rpt_log_index_tracking_di_cube_v17_449816812282970114 already exists. SQLSTATE: 42P07.: While executing Remote SQLSTATE: 42P07, Stack trace:

0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x26f45d32 in /data1/byconity/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x105d16e0 in /data1/byconity/clickhouse
2. DB::readException(DB::ReadBuffer&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) @ 0x10642611 in /data1/byconity/clickhouse
3. DB::RPCHelpers::checkException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x2010d02b in /data1/byconity/clickhouse
4. void DB::RPCHelpers::onAsyncCallDoneWithFailedInfo<DB::Protos::SendResourcesResp>(DB::Protos::SendResourcesResp*, brpc::Controller*, std::__1::shared_ptr<DB::ExceptionHandlerWithFailedInfo>, DB::WorkerId) @ 0x1ff0b7aa in /data1/byconity/clickhouse
5. brpc::internal::FunctionClosure4<DB::Protos::SendResourcesResp*, brpc::Controller*, std::__1::shared_ptr<DB::ExceptionHandlerWithFailedInfo>, DB::WorkerId>::Run() @ 0x1ff0d521 in /data1/byconity/clickhouse
6. /build/build_docker/../contrib/incubator-brpc/src/brpc/controller.h:704: brpc::Controller::EndRPC(brpc::Controller::CompletionInfo const&) @ 0x26ca1ec9 in /data1/byconity/clickhouse
7. /build/build_docker/../contrib/incubator-brpc/src/brpc/controller.cpp:0: brpc::Controller::OnVersionedRPCReturned(brpc::Controller::CompletionInfo const&, bool, int) @ 0x26ca0a26 in /data1/byconity/clickhouse
8. /build/build_docker/../contrib/incubator-brpc/src/brpc/details/controller_private_accessor.h:0: brpc::policy::ProcessRpcResponse(brpc::InputMessageBase*) @ 0x26cc9f50 in /data1/byconity/clickhouse
9. /build/build_docker/../contrib/incubator-brpc/src/brpc/input_messenger.cpp:386: brpc::InputMessenger::OnNewMessages(brpc::Socket*) @ 0x26cc07ee in /data1/byconity/clickhouse
10. /build/build_docker/../contrib/libcxx/include/memory:1655: brpc::Socket::ProcessEvent(void*) @ 0x26df094d in /data1/byconity/clickhouse
11. /build/build_docker/../contrib/incubator-brpc/src/bthread/task_group.cpp:304: bthread::TaskGroup::task_runner(long) @ 0x26c8e44d in /data1/byconity/clickhouse

Version

0.4.0

@bright-zy bright-zy added the bug Something isn't working label May 17, 2024
@kevinthfang
Copy link
Contributor

Do you directly insert into worker? If so, please insert into server instead. Currently this is a know issue for direct insert.

@bright-zy
Copy link
Author

@kevinthfang I insert into server, It's not happening back there.

@kevinthfang kevinthfang added the duplicate This issue or pull request already exists label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants