Skip to content

Query with id is already running. (QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING) #1529

Description

@somemistake

I queried with namedParameterJdbcTemplate in for loop. But sometimes driver prompts " Query with id = xxxxxx is already running.

This is my code

IntStream
                    .range(0, config.getPartitionCount())
                    .mapToObj(PartitionUtils::getPartition)
                    .forEach( partition ->
                            namedParameterJdbcTemplate.execute(
                               "OPTIMIZE TABLE transaction_operation PARTITION :partition FINAL DEDUPLICATE",
                                new MapSqlParameterSource("partition", Integer.parseInt(partition)),
                                PreparedStatement::execute
                            );
                    );

Code: 216. DB::Exception: Query with id = 2b82eae6-e0f3-47dc-a857-2bb02dff7bbd is already running. (QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING) (version 22.2.2.1)

driver version: com.clickhouse:clickhouse-jdbc:0.4.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions