From df5a2b92f98f8671993669a34ed12493cc871884 Mon Sep 17 00:00:00 2001 From: Artem Chernyshev Date: Mon, 2 Jun 2025 22:15:51 +0300 Subject: [PATCH] fix: bump inmem COSI state history capacity This should address buffer overrun on Omni restarts, when the account has >1000 machines registered. Fixes: https://github.com/siderolabs/omni/issues/1234 Signed-off-by: Artem Chernyshev --- internal/backend/runtime/omni/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/backend/runtime/omni/state.go b/internal/backend/runtime/omni/state.go index 5555bf73..8b79670a 100644 --- a/internal/backend/runtime/omni/state.go +++ b/internal/backend/runtime/omni/state.go @@ -90,7 +90,7 @@ func newNamespacedState(params *config.Params, primaryStorageCoreState state.Cor return nil, nil, fmt.Errorf("failed to create etcd backup store: %w", err) } - buildEphemeralState := inmem.NewStateWithOptions(inmem.WithHistoryGap(20)) + buildEphemeralState := inmem.NewStateWithOptions(inmem.WithHistoryGap(20), inmem.WithHistoryMaxCapacity(10000)) ephemeralState := buildEphemeralState(resources.EphemeralNamespace) metaEphemeralState := buildEphemeralState(meta.NamespaceName) infraProviderState := infraprovider.NewState(primaryStorageCoreState, ephemeralState, logger.With(logging.Component("infraprovider_state")))