minor fixes

This commit is contained in:
Anton Popov 2022-02-03 15:04:13 +03:00
parent 768c71c1ac
commit 0755cfa584
2 changed files with 4 additions and 2 deletions

View File

@ -485,6 +485,8 @@ void AsynchronousInsertQueue::finishWithException(
entry->finish(std::make_exception_ptr(exception));
}
}
CurrentMetrics::sub(CurrentMetrics::PendingAsyncInsert, entries.size());
}
}

View File

@ -12,8 +12,8 @@ ${CLICKHOUSE_CLIENT} -q "CREATE TABLE t_async_insert_02193_2 (id UInt32, s Strin
${CLICKHOUSE_CLIENT} -q "INSERT INTO t_async_insert_02193_2 FORMAT CSV SETTINGS async_insert = 1 1,aaa"
${CLICKHOUSE_CLIENT} -q "INSERT INTO t_async_insert_02193_2 FORMAT Values SETTINGS async_insert = 1 (2, 'bbb')"
${CLICKHOUSE_CLIENT} -q "INSERT INTO t_async_insert_02193_2 VALUES (3, 'ccc')"
${CLICKHOUSE_CLIENT} -q 'INSERT INTO t_async_insert_02193_2 FORMAT JSONEachRow {"id": 4, "s": "ddd"}'
${CLICKHOUSE_CLIENT} -q "INSERT INTO t_async_insert_02193_2 VALUES (3, 'ccc')" --async_insert=1
${CLICKHOUSE_CLIENT} -q 'INSERT INTO t_async_insert_02193_2 FORMAT JSONEachRow {"id": 4, "s": "ddd"}' --async_insert=1
${CLICKHOUSE_CLIENT} -q "SELECT * FROM t_async_insert_02193_2 ORDER BY id"
${CLICKHOUSE_CLIENT} -q "TRUNCATE TABLE t_async_insert_02193_2"