mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-15 04:17:30 +01:00
907 B
907 B
Session Context
Session ID: 42401d2e-7d1c-4c0e-abe6-356cb2d48747 Commit Message: Check if the fixes are correctly merged in nodes.go
Prompts
Prompt 1
Check if the fixes are correctly merged in nodes.go
Summary
All clean. Here's a summary of what was wrong and fixed in node.go:
- Duplicate
QueryNodesWithMeta(lines 468-541): The old unfixed version was left in alongside the fixed version at line 391. Removed the duplicate. CountStates: Had both old code (manualstateMapcounting without SQLCOUNT(*)) and new code (SQLCOUNT(*) ... GROUP BY) concatenated together. The secondrows.Next()loop was dead code since the first loop already consumed all rows. Replaced with the correct version usingSELECT column, COUNT(*) ... GROUP BY column.QueryNodesline 376: Leftoverrows.Close()inside the scan error path (redundant withdefer). Removed.