Commit Graph

1020 Commits

Author SHA1 Message Date
Christoph Kluge
ba366d0d72 use inline literals in simple queries, add downgrade optimize 2026-03-13 15:16:19 +01:00
f15f1452cc Inline jobstate literal in query
Entire-Checkpoint: 35f06df74b51
2026-03-13 15:16:07 +01:00
d586fe4b43 Optimize usage dashboard: partial indexes, request cache, parallel histograms
- Add migration 14: partial covering indexes WHERE job_state='running'
  for user/project/subcluster groupings (tiny B-tree vs full table)
- Inline literal state value in BuildWhereClause so SQLite matches
  partial indexes instead of parameterized placeholders
- Add per-request statsGroupCache (sync.Once per filter+groupBy key)
  so identical grouped stats queries execute only once per GQL operation
- Parallelize 4 histogram queries in AddHistograms using errgroup
- Consolidate frontend from 6 GQL aliases to 2, sort+slice top-10
  client-side via $derived

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5b26a6e5ff10
2026-03-13 14:31:37 +01:00
cbe46c3524 Merge branch 'hotfix' of github.com:ClusterCockpit/cc-backend into hotfix 2026-03-13 13:17:34 +01:00
dd3e5427f4 Add covering indexes for status/dashboard queries (migration 13)
Adds composite covering indexes on (cluster, job_state, <group_col>, ...)
for user, project, and subcluster groupings to enable index-only scans
for status views. Drops subsumed 3-column indexes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 3d8def28e96e
2026-03-13 13:12:54 +01:00
Christoph Kluge
e666980184 fix typo 2026-03-13 12:07:43 +01:00
Christoph Kluge
c238f68af6 reduce unnecessary complexity 2026-03-13 12:05:16 +01:00
Christoph Kluge
58c0c79f72 handle single job state queries as simple stringquery
- this will improve index usage for single state queries
2026-03-13 12:03:06 +01:00
Christoph Kluge
a877937a25 add missing downgarde index drop, add optimize after downgrades 2026-03-13 10:11:11 +01:00
a4f9ba6975 Apply correct log level
Entire-Checkpoint: 8288af281b94
2026-03-13 07:58:57 +01:00
3aacc669b6 Remove debug timer 2026-03-13 06:18:21 +01:00
96fc44a649 fix: Optimize project stat query 2026-03-13 06:06:38 +01:00
8e86e8720d Make stats query selective. Add stats index. Add paging to user list.
Entire-Checkpoint: d42431eee30d
2026-03-12 20:16:55 +01:00
4555fb8a86 Merge branch 'hotfix' of github.com:ClusterCockpit/cc-backend into hotfix 2026-03-12 20:15:54 +01:00
0e27624d73 Add flag to optimize db. Remove ANALYZE on startup.
Entire-Checkpoint: d49917ff4b10
2026-03-12 20:12:49 +01:00
Christoph Kluge
8563ed5e08 fix: remove indices from migration 9
- optimization migration 11 drops these indices, so rather not create them in the first place
2026-03-12 14:45:45 +01:00
Christoph Kluge
972b14033a add db migration 11, optimizing index count 2026-03-11 16:07:29 +01:00
af78f06ced fix: Reduce complexity for groupBy stats queries
Entire-Checkpoint: fc899a70a751
2026-03-11 15:14:59 +01:00
e70310dcbc fix: Segvault when taggers are enabled but rule directories missing 2026-03-11 11:15:08 +01:00
00d2f97c4c fix: Large heap allocations in sqlite driver. Sanitize sqlite config and make it configurablex. Allow to cancel queries. 2026-03-11 11:14:37 +01:00
c8d8f7084a Merge branch 'hotfix' of github.com:ClusterCockpit/cc-backend into hotfix 2026-03-11 07:50:55 +01:00
dc7407d0f0 fix: prevent segvault if enable-job-taggers option is tru but tagger config directories are missing
Entire-Checkpoint: 9ec86e3669e1
2026-03-11 07:50:53 +01:00
eba3995610 Add Analyse on db startup
Entire-Checkpoint: ea70a955214d
2026-03-11 05:28:52 +01:00
f8831e7040 Fixed merge errors
Entire-Checkpoint: ddd4fa4a7bbb
2026-03-11 05:09:38 +01:00
1cf99206a9 Merge branch 'hotfix' of github.com:ClusterCockpit/cc-backend into hotfix 2026-03-11 05:06:26 +01:00
5d3d77620e fix: Add defer.close for all queries 2026-03-11 05:04:20 +01:00
Christoph Kluge
cc38b17472 fix wrong field checked vor json validity 2026-03-10 17:02:09 +01:00
282197ebef fix: Round floats in tagger message
Entire-Checkpoint: b68850c6fcff
2026-03-10 06:01:31 +01:00
Christoph Kluge
d2bc046fc6 fix ranged filter GT and LT conditions, reduce energy filter preset 2026-03-09 11:28:30 +01:00
845d0111af Further consolidate and improve ccms query builder
Entire-Checkpoint: d10e6221ee4f
2026-03-04 17:31:36 +01:00
26982088c3 Consolidate code for external and internal ccms buildQueries function
Entire-Checkpoint: fc3be444ef4c
2026-03-04 16:43:05 +01:00
67a17b5306 Reduce noise in info log 2026-03-04 15:14:35 +01:00
Christoph Kluge
db625239ea apply updated rangefilter logic to energy and stats 2026-03-04 14:18:30 +01:00
Christoph Kluge
84fda9c8e2 optimize resource filter by only using range query if required, review filter component 2026-03-03 19:08:16 +01:00
Christoph Kluge
f11ff3302d revert urql/svelte bump, bump svelte patch version, regenerate backend 2026-03-03 17:47:17 +01:00
6da41982ce Further optimize queries for better index usage 2026-03-03 15:54:51 +01:00
b13e1628a0 Merge branch 'dev' of github.com:ClusterCockpit/cc-backend into dev 2026-03-03 15:41:51 +01:00
5669eb5818 Optimize queries for existing indices 2026-03-03 15:41:44 +01:00
688ad507a2 Merge branch 'optimize-checkpoint-wal' into dev 2026-03-03 06:58:28 +01:00
Christoph Kluge
38bb2dd4ec add outofindex checks to external ccms codebase 2026-03-02 16:24:38 +01:00
Christoph Kluge
32fd18543a differentiate between expected and unexpected cases in external ccms queryBuilder 2026-03-02 16:24:38 +01:00
Christoph Kluge
718ff60221 clarify ccms logs 2026-03-02 16:24:38 +01:00
3d5a124321 Refine patterns. Do not match commented lines. 2026-03-02 15:01:44 +01:00
Christoph Kluge
d00aa2666d activate update of roles and projects if updateUserOnLogin is set 2026-02-27 15:20:09 +01:00
a418abc7d5 Run go fix 2026-02-27 14:40:26 +01:00
a1db8263d7 Document line protocol. Optimize REST writeMetric path 2026-02-27 12:30:27 +01:00
6ecb934967 Switch to CC line-protocol package. Update cc-lib. 2026-02-27 08:55:33 +01:00
Christoph Kluge
348b6010e8 fix typo preventing template condition to work 2026-02-26 15:09:01 +01:00
998aff2345 Fix bug in taggers. Allow to add multiple tags to one job 2026-02-24 06:44:17 +01:00
dadcb983e7 Merge branch 'dev' into add_GetMemoryDomainsBySocket_2026 2026-02-23 18:47:03 +01:00