mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-15 04:17:30 +01:00
19 lines
907 B
Markdown
19 lines
907 B
Markdown
# 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`:
|
|
|
|
1. **Duplicate `QueryNodesWithMeta`** (lines 468-541): The old unfixed version was left in alongside the fixed version at line 391. Removed the duplicate.
|
|
2. **`CountStates`**: Had both old code (manual `stateMap` counting without SQL `COUNT(*)`) and new code (SQL `COUNT(*) ... GROUP BY`) concatenated together. The second `rows.Next()` loop was dead code since the first loop already consumed all rows. Replaced with the correct version using `SELECT column, COUNT(*) ... GROUP BY column`.
|
|
3. **`QueryNodes` line 376**: Leftover `rows.Close()` inside the scan error path (redundant with `defer`). Removed.
|