fix: resolve duplicate ExecutionStore bean conflict
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:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user