mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 23:19:02 +08:00
fix: error handling for index removal from selected field (#1935)
Co-authored-by: Ankit Nayan <ankit@signoz.io>
This commit is contained in:
parent
1916fc87b0
commit
2e58f6db7a
@ -3233,7 +3233,8 @@ func (r *ClickHouseReader) UpdateLogField(ctx context.Context, field *model.Upda
|
|||||||
// remove index
|
// remove index
|
||||||
query := fmt.Sprintf("ALTER TABLE %s.%s ON CLUSTER %s DROP INDEX IF EXISTS %s_idx", r.logsDB, r.logsLocalTable, cluster, field.Name)
|
query := fmt.Sprintf("ALTER TABLE %s.%s ON CLUSTER %s DROP INDEX IF EXISTS %s_idx", r.logsDB, r.logsLocalTable, cluster, field.Name)
|
||||||
err := r.db.Exec(ctx, query)
|
err := r.db.Exec(ctx, query)
|
||||||
if err != nil {
|
// we are ignoring errors with code 341 as it is an error with updating old part https://github.com/SigNoz/engineering-pod/issues/919#issuecomment-1366344346
|
||||||
|
if err != nil && !strings.HasPrefix(err.Error(), "code: 341") {
|
||||||
return &model.ApiError{Err: err, Typ: model.ErrorInternal}
|
return &model.ApiError{Err: err, Typ: model.ErrorInternal}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user