Skip to content

DrDroid AI: Fix: ClickHouse Decimal math overflow in SigNoz v0.45+#137

Open
doctor-droid-app[bot] wants to merge 1 commit intomasterfrom
fix-automated-debugging-iw297yvt
Open

DrDroid AI: Fix: ClickHouse Decimal math overflow in SigNoz v0.45+#137
doctor-droid-app[bot] wants to merge 1 commit intomasterfrom
fix-automated-debugging-iw297yvt

Conversation

@doctor-droid-app
Copy link
Copy Markdown

Summary

Fixed a ClickHouse error 407 (Decimal math overflow) caused by aggregation functions running on the durationNano column after it changed from UInt64 to Decimal128(9) in SigNoz v0.45+.

Changes

  • Replaced the fetch_services() call to /api/v1/services with a direct ClickHouse SQL query that avoids any Decimal aggregation on durationNano
  • Changed durationNano field dataType declarations from float64 to int64 in the default traces fields and latency metric query templates
  • Added toFloat64() casting for durationNano in the SELECT columns of three raw SQL queries to prevent type errors when returning the column value

Testing

  • Verified that fetch_services() no longer calls the SigNoz endpoint that internally runs avg(durationNano) and quantile()(durationNano) on the Decimal column
  • Confirmed that the direct ClickHouse query only groups by serviceName with a simple count(), avoiding any Decimal math operations
  • Confirmed that all three raw trace query locations now cast durationNano to float64 before returning results

This PR is created as part of investigation https://aiops.drdroid.io/?investigation_id=b9697645-fc65-4632-be14-e016bf899584

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants