diff --git a/pkg/sync/negentropy/manager.go b/pkg/sync/negentropy/manager.go index 63f7a9a..aa85241 100644 --- a/pkg/sync/negentropy/manager.go +++ b/pkg/sync/negentropy/manager.go @@ -63,6 +63,7 @@ type Config struct { IDSize int ClientSessionTimeout time.Duration Filter *filter.F // Optional filter for selective sync + MaxEvents uint // Max events to sync per cycle (0 = unlimited) } // Manager handles negentropy sync operations. @@ -362,7 +363,11 @@ func (m *Manager) buildStorage(ctx context.Context) (*negentropy.Vector, error) storage := negentropy.NewVector() // Build filter - start with configured filter or empty - limit := uint(100000) + // Use configured MaxEvents or default to 1,000,000 + limit := m.config.MaxEvents + if limit == 0 { + limit = 1000000 // Default to 1M events + } var f *filter.F if m.config.Filter != nil { // Use configured filter with our limit diff --git a/pkg/sync/negentropy/server/service.go b/pkg/sync/negentropy/server/service.go index 08f8318..4bde5ab 100644 --- a/pkg/sync/negentropy/server/service.go +++ b/pkg/sync/negentropy/server/service.go @@ -306,11 +306,11 @@ func (s *Service) buildStorageForFilter(ctx context.Context, protoFilter *common // If no filter provided, use a reasonable limit if f == nil { - limit := uint(100000) + limit := uint(1000000) f = &filter.F{Limit: &limit} } if f.Limit == nil { - limit := uint(100000) + limit := uint(1000000) f.Limit = &limit } diff --git a/pkg/version/version b/pkg/version/version index 83ef1ef..3cb58c3 100644 --- a/pkg/version/version +++ b/pkg/version/version @@ -1 +1 @@ -v0.55.4 +v0.55.5