fix: resolve duplicate ExecutionStore bean conflict
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m5s
CI / docker (push) Successful in 49s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 55s

ClickHouseExecutionStore implements ExecutionStore, so the concrete bean
already satisfies the interface — remove redundant wrapper bean. Align
ChunkAccumulator and ExecutionFlushScheduler conditions to
cameleer.storage.executions flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-01 09:44:02 +02:00
parent 520181d241
commit bc1c71277c

View File

@@ -88,19 +88,13 @@ public class StorageBeanConfig {
return new PostgresMetricsQueryStore(jdbc); return new PostgresMetricsQueryStore(jdbc);
} }
// ── ClickHouse Execution Store ────────────────────────────────────── // ── Execution Store ──────────────────────────────────────────────────
@Bean
@ConditionalOnProperty(name = "clickhouse.enabled", havingValue = "true")
public ClickHouseExecutionStore clickHouseExecutionStore(
@Qualifier("clickHouseJdbcTemplate") JdbcTemplate clickHouseJdbc) {
return new ClickHouseExecutionStore(clickHouseJdbc);
}
@Bean @Bean
@ConditionalOnProperty(name = "cameleer.storage.executions", havingValue = "clickhouse", matchIfMissing = true) @ConditionalOnProperty(name = "cameleer.storage.executions", havingValue = "clickhouse", matchIfMissing = true)
public ExecutionStore executionStoreClickHouse(ClickHouseExecutionStore chStore) { public ClickHouseExecutionStore clickHouseExecutionStore(
return chStore; // Same instance, also exposed as ExecutionStore @Qualifier("clickHouseJdbcTemplate") JdbcTemplate clickHouseJdbc) {
return new ClickHouseExecutionStore(clickHouseJdbc);
} }
@Bean @Bean
@@ -110,7 +104,7 @@ public class StorageBeanConfig {
} }
@Bean @Bean
@ConditionalOnProperty(name = "clickhouse.enabled", havingValue = "true") @ConditionalOnProperty(name = "cameleer.storage.executions", havingValue = "clickhouse", matchIfMissing = true)
public ChunkAccumulator chunkAccumulator( public ChunkAccumulator chunkAccumulator(
WriteBuffer<MergedExecution> executionBuffer, WriteBuffer<MergedExecution> executionBuffer,
WriteBuffer<ChunkAccumulator.ProcessorBatch> processorBatchBuffer) { WriteBuffer<ChunkAccumulator.ProcessorBatch> processorBatchBuffer) {
@@ -121,7 +115,7 @@ public class StorageBeanConfig {
} }
@Bean @Bean
@ConditionalOnProperty(name = "clickhouse.enabled", havingValue = "true") @ConditionalOnProperty(name = "cameleer.storage.executions", havingValue = "clickhouse", matchIfMissing = true)
public ExecutionFlushScheduler executionFlushScheduler( public ExecutionFlushScheduler executionFlushScheduler(
WriteBuffer<MergedExecution> executionBuffer, WriteBuffer<MergedExecution> executionBuffer,
WriteBuffer<ChunkAccumulator.ProcessorBatch> processorBatchBuffer, WriteBuffer<ChunkAccumulator.ProcessorBatch> processorBatchBuffer,