mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
843 B
843 B
Fix Node Metrics PostgreSQL Type Encoding
Objective
Fix the PostgreSQL type encoding error (failed to encode args[0]: unable to encode 5 into text format for text (OID 25)) and integer out of range error when querying node metrics for time ranges greater than 1 hour.
Tasks
- Identify the problematic downsampled SQL aggregation in
GetNodeMetrics. - Fix the
? AS node_idplaceholder which confused PostgreSQL's type inference by directly embedding thenodeIDusingfmt.Sprintf("%d AS node_id"). - Change all
CAST(X AS INTEGER)toCAST(X AS BIGINT)to prevent 32-bit integer overflow on Unix millisecond timestamps in PostgreSQL. - Verify the build and tests pass.
- Commit all changes, create a new branch, push, create a Pull Request, merge the PR into
main, and publish a new tag2.1.9-rc9.