diff --git a/configs/config-demo.json b/configs/config-demo.json index 79670f91..e53fa8bd 100644 --- a/configs/config-demo.json +++ b/configs/config-demo.json @@ -15,8 +15,8 @@ }, "metric-store": { "checkpoints": { - "interval": "1h" + "interval": "12h" }, - "retention-in-memory": "12h" + "retention-in-memory": "48h" } } diff --git a/configs/config.json b/configs/config.json index f91d9661..90a6ba79 100644 --- a/configs/config.json +++ b/configs/config.json @@ -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" diff --git a/internal/metricstore/metricstore.go b/internal/metricstore/metricstore.go index 37028654..0d7e5f45 100644 --- a/internal/metricstore/metricstore.go +++ b/internal/metricstore/metricstore.go @@ -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 }