Test and update files for dynamic retention

This commit is contained in:
Aditya Ujeniya
2026-01-15 17:48:59 +01:00
parent 489ad44b9f
commit 7cd98c4f25
3 changed files with 8 additions and 22 deletions

View File

@@ -15,8 +15,8 @@
},
"metric-store": {
"checkpoints": {
"interval": "1h"
"interval": "12h"
},
"retention-in-memory": "12h"
"retention-in-memory": "48h"
}
}

View File

@@ -47,10 +47,10 @@
},
"metric-store": {
"checkpoints": {
"interval": "1h"
"interval": "12h"
},
"retention-in-memory": "12h",
"subscriptions": [
"retention-in-memory": "48h",
"nats-subscriptions": [
{
"subscribe-to": "hpc-nats",
"cluster-tag": "fritz"

View File

@@ -142,18 +142,14 @@ func Init(rawConfig json.RawMessage, wg *sync.WaitGroup) {
retentionGoroutines := 1
checkpointingGoroutines := 1
dataStagingGoroutines := 1
archivingGoroutines := 0
if Keys.Archive != nil {
archivingGoroutines = 1
}
archivingGoroutines := 1
totalGoroutines := retentionGoroutines + checkpointingGoroutines + dataStagingGoroutines + archivingGoroutines
wg.Add(totalGoroutines)
Retention(wg, ctx)
Checkpointing(wg, ctx)
if Keys.Archive != nil {
Archiving(wg, ctx)
}
Archiving(wg, ctx)
DataStaging(wg, ctx)
// Note: Signal handling has been removed from this function.
@@ -291,13 +287,6 @@ func Free(ms *MemoryStore, t time.Time) (int, error) {
return 0, err
}
// excludeSelectors := make(map[string][]string, 0)
// excludeSelectors := map[string][]string{
// "alex": {"a0122", "a0123", "a0225"},
// "fritz": {"f0201", "f0202"},
// }
switch lenMap := len(excludeSelectors); lenMap {
// If the length of the map returned by GetUsedNodes() is 0,
@@ -361,9 +350,6 @@ func GetSelectors(ms *MemoryStore, excludeSelectors map[string][]string) [][]str
}
}
// fmt.Printf("All selectors: %#v\n\n", allSelectors)
// fmt.Printf("filteredSelectors: %#v\n\n", filteredSelectors)
return filteredSelectors
}