Skip to content

Commit 0116eb2

Browse files
feat(sqlmigration): update apdex and TTL status tables (#7517)
* feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): make the preference package multi tenant * feat(preference): address nit pick comments * feat(preference): added the cascade delete for preferences * feat(sqlmigration): update apdex and TTL status tables (#7481) * feat(sqlmigration): update the apdex and ttl tables * feat(sqlmigration): register the new migration and rename table * feat(sqlmigration): fix the ttl queries * feat(sqlmigration): update the TTL and apdex tables * feat(sqlmigration): update the TTL and apdex tables
1 parent 79e9d1b commit 0116eb2

File tree

16 files changed

+616
-129
lines changed

16 files changed

+616
-129
lines changed

ee/query-service/app/db/reader.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@ import (
55

66
"github.com/ClickHouse/clickhouse-go/v2"
77

8-
"github.com/jmoiron/sqlx"
9-
108
"github.com/SigNoz/signoz/pkg/cache"
119
"github.com/SigNoz/signoz/pkg/prometheus"
1210
basechr "github.com/SigNoz/signoz/pkg/query-service/app/clickhouseReader"
1311
"github.com/SigNoz/signoz/pkg/query-service/interfaces"
12+
"github.com/SigNoz/signoz/pkg/sqlstore"
1413
"github.com/SigNoz/signoz/pkg/telemetrystore"
1514
)
1615

1716
type ClickhouseReader struct {
1817
conn clickhouse.Conn
19-
appdb *sqlx.DB
18+
appdb sqlstore.SQLStore
2019
*basechr.ClickHouseReader
2120
}
2221

2322
func NewDataConnector(
24-
localDB *sqlx.DB,
23+
sqlDB sqlstore.SQLStore,
2524
telemetryStore telemetrystore.TelemetryStore,
2625
prometheus prometheus.Prometheus,
2726
lm interfaces.FeatureLookup,
@@ -31,10 +30,10 @@ func NewDataConnector(
3130
fluxIntervalForTraceDetail time.Duration,
3231
cache cache.Cache,
3332
) *ClickhouseReader {
34-
chReader := basechr.NewReader(localDB, telemetryStore, prometheus, lm, cluster, useLogsNewSchema, useTraceNewSchema, fluxIntervalForTraceDetail, cache)
33+
chReader := basechr.NewReader(sqlDB, telemetryStore, prometheus, lm, cluster, useLogsNewSchema, useTraceNewSchema, fluxIntervalForTraceDetail, cache)
3534
return &ClickhouseReader{
3635
conn: telemetryStore.ClickhouseDB(),
37-
appdb: localDB,
36+
appdb: sqlDB,
3837
ClickHouseReader: chReader,
3938
}
4039
}

ee/query-service/app/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func NewServer(serverOptions *ServerOptions) (*Server, error) {
139139
}
140140

141141
reader := db.NewDataConnector(
142-
serverOptions.SigNoz.SQLStore.SQLxDB(),
142+
serverOptions.SigNoz.SQLStore,
143143
serverOptions.SigNoz.TelemetryStore,
144144
serverOptions.SigNoz.Prometheus,
145145
lm,

0 commit comments

Comments
 (0)