When using linq2db with ClickHouseClient in multi-threaded mode, the error "Query with id ... is already running. (QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING)" occurs.
In ClickhouseCommand query_id parameter is passed, which is substituted from the previous answer.
Workaround - I implement an additional CommandInterceptor:
internal class ClearQueryIdInterceptor : CommandInterceptor
{
public override DbCommand CommandInitialized(CommandEventData eventData, DbCommand command)
{
if (command is ClickHouseCommand clickHouseCommand)
{
clickHouseCommand.QueryId = null;
}
return command;
}
}
Please check whether the query_id parameter is really required in ClickHouseCommand.
When using linq2db with ClickHouseClient in multi-threaded mode, the error "Query with id ... is already running. (QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING)" occurs. In ClickhouseCommand query_id parameter is passed, which is substituted from the previous answer. Workaround - I implement an additional CommandInterceptor:
Please check whether the query_id parameter is really required in ClickHouseCommand.