Имеем последний кликхауз на сервере Ubuntu 16.04.2 LTS, коллектор написанный на java с использованием последнего JDBC драйвера.
Задача записывать текущий онлайн, если запрос INSERT делать через обычный execute все ок работает и сохраняется, если начинать тот-же запрос складывать в батч (statement.addBatch()) накапливать и сохранять пачкой, все падает вот с такой записью в логе:
<Error> executeQuery: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected \t before: 000\t1493823219000\t1493823219000\t1\t2\t3\ten_US\tssid\t4\n: (at row 1)
Could not print diagnostic info because parsing of data hasn't started.
, e.what() = DB::Exception (from [::ffff:195.211.79.234]:58018) (in query: INSERT INTO statistic.online FORMAT TabSeparated ), Stack trace:
0. clickhouse-server(StackTrace::StackTrace()+0x16) [0x1e27296]
1. clickhouse-server(DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)+0x1f) [0x107021f]
2. clickhouse-server() [0x1e3e9f5]
3. clickhouse-server(DB::assertChar(char, DB::ReadBuffer&)+0x3a) [0x1e3fd4a]
4. clickhouse-server(DB::TabSeparatedRowInputStream::read(DB::Block&)+0x97) [0x2c6f8f7]
5. clickhouse-server(DB::BlockInputStreamFromRowInputStream::readImpl()+0x6c) [0x2b46e7c]
6. clickhouse-server(DB::IProfilingBlockInputStream::read()+0x31a) [0x180f23a]
7. clickhouse-server(DB::InputStreamFromASTInsertQuery::readImpl()+0x27) [0x1d84787]
8. clickhouse-server(DB::IProfilingBlockInputStream::read()+0x31a) [0x180f23a]
9. clickhouse-server(DB::copyData(DB::IBlockInputStream&, DB::IBlockOutputStream&, std::atomic<bool>*)+0x77) [0x2b12ee7]
10. clickhouse-server(DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, DB::Context&, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)+0x279) [0x1d83d99]
11. clickhouse-server(DB::HTTPHandler::processQuery(Poco::Net::HTTPServerRequest&, HTMLForm&, Poco::Net::HTTPServerResponse&, DB::HTTPHandler::Output&)+0x19b0) [0x1078750]
12. clickhouse-server(DB::HTTPHandler::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)+0x32b) [0x107a21b]
13. clickhouse-server(Poco::Net::HTTPServerConnection::run()+0x2fe) [0x31b58fe]
14. clickhouse-server(Poco::Net::TCPServerConnection::start()+0xf) [0x31aaa0f]
15. clickhouse-server(Poco::Net::TCPServerDispatcher::run()+0x13b) [0x31b0e4b]
16. clickhouse-server(Poco::PooledThread::run()+0xb7) [0x341ca07]
17. clickhouse-server(Poco::ThreadImpl::runnableEntry(void*)+0xa5) [0x33e8a45]
18. /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7fb43dd6a6ba]
19. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fb43d38b82d]
2017.05.03 19:12:53.212341 [ 6 ] <Error> HTTPHandler: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected \t before: 000\t1493823219000\t1493823219000\t1\t2\t3\ten_US\tssid\t4\n: (at row 1)
Could not print diagnostic info because parsing of data hasn't started.
, e.what() = DB::Exception, Stack trace:
0. clickhouse-server(StackTrace::StackTrace()+0x16) [0x1e27296]
1. clickhouse-server(DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)+0x1f) [0x107021f]
2. clickhouse-server() [0x1e3e9f5]
3. clickhouse-server(DB::assertChar(char, DB::ReadBuffer&)+0x3a) [0x1e3fd4a]
4. clickhouse-server(DB::TabSeparatedRowInputStream::read(DB::Block&)+0x97) [0x2c6f8f7]
5. clickhouse-server(DB::BlockInputStreamFromRowInputStream::readImpl()+0x6c) [0x2b46e7c]
6. clickhouse-server(DB::IProfilingBlockInputStream::read()+0x31a) [0x180f23a]
7. clickhouse-server(DB::InputStreamFromASTInsertQuery::readImpl()+0x27) [0x1d84787]
8. clickhouse-server(DB::IProfilingBlockInputStream::read()+0x31a) [0x180f23a]
9. clickhouse-server(DB::copyData(DB::IBlockInputStream&, DB::IBlockOutputStream&, std::atomic<bool>*)+0x77) [0x2b12ee7]
10. clickhouse-server(DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, DB::Context&, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)+0x279) [0x1d83d99]
11. clickhouse-server(DB::HTTPHandler::processQuery(Poco::Net::HTTPServerRequest&, HTMLForm&, Poco::Net::HTTPServerResponse&, DB::HTTPHandler::Output&)+0x19b0) [0x1078750]
12. clickhouse-server(DB::HTTPHandler::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)+0x32b) [0x107a21b]
13. clickhouse-server(Poco::Net::HTTPServerConnection::run()+0x2fe) [0x31b58fe]
14. clickhouse-server(Poco::Net::TCPServerConnection::start()+0xf) [0x31aaa0f]
15. clickhouse-server(Poco::Net::TCPServerDispatcher::run()+0x13b) [0x31b0e4b]
16. clickhouse-server(Poco::PooledThread::run()+0xb7) [0x341ca07]
17. clickhouse-server(Poco::ThreadImpl::runnableEntry(void*)+0xa5) [0x33e8a45]
18. /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7fb43dd6a6ba]
19. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fb43d38b82d]