From 3b8d0fdd306ef918380d4eef7ce2dd5a8653c464 Mon Sep 17 00:00:00 2001 From: Anna Lushnikova Date: Tue, 24 Sep 2024 10:37:55 -0400 Subject: [PATCH] use uint64 for some big values that set to max by default --- databases.go | 34 +++++++++++++++++----------------- databases_test.go | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/databases.go b/databases.go index fd932a2..d2fd4c3 100644 --- a/databases.go +++ b/databases.go @@ -663,23 +663,23 @@ type MongoDBConfig struct { // KafkaConfig holds advanced configurations for Kafka database clusters. type KafkaConfig struct { - GroupInitialRebalanceDelayMs *int `json:"group_initial_rebalance_delay_ms,omitempty"` - GroupMinSessionTimeoutMs *int `json:"group_min_session_timeout_ms,omitempty"` - GroupMaxSessionTimeoutMs *int `json:"group_max_session_timeout_ms,omitempty"` - MessageMaxBytes *int `json:"message_max_bytes,omitempty"` - LogCleanerDeleteRetentionMs *int64 `json:"log_cleaner_delete_retention_ms,omitempty"` - LogCleanerMinCompactionLagMs *int64 `json:"log_cleaner_min_compaction_lag_ms,omitempty"` - LogFlushIntervalMs *int64 `json:"log_flush_interval_ms,omitempty"` - LogIndexIntervalBytes *int `json:"log_index_interval_bytes,omitempty"` - LogMessageDownconversionEnable *bool `json:"log_message_downconversion_enable,omitempty"` - LogMessageTimestampDifferenceMaxMs *int64 `json:"log_message_timestamp_difference_max_ms,omitempty"` - LogPreallocate *bool `json:"log_preallocate,omitempty"` - LogRetentionBytes *int64 `json:"log_retention_bytes,omitempty"` - LogRetentionHours *int `json:"log_retention_hours,omitempty"` - LogRetentionMs *int64 `json:"log_retention_ms,omitempty"` - LogRollJitterMs *int64 `json:"log_roll_jitter_ms,omitempty"` - LogSegmentDeleteDelayMs *int `json:"log_segment_delete_delay_ms,omitempty"` - AutoCreateTopicsEnable *bool `json:"auto_create_topics_enable,omitempty"` + GroupInitialRebalanceDelayMs *int `json:"group_initial_rebalance_delay_ms,omitempty"` + GroupMinSessionTimeoutMs *int `json:"group_min_session_timeout_ms,omitempty"` + GroupMaxSessionTimeoutMs *int `json:"group_max_session_timeout_ms,omitempty"` + MessageMaxBytes *int `json:"message_max_bytes,omitempty"` + LogCleanerDeleteRetentionMs *int64 `json:"log_cleaner_delete_retention_ms,omitempty"` + LogCleanerMinCompactionLagMs *int64 `json:"log_cleaner_min_compaction_lag_ms,omitempty"` + LogFlushIntervalMs *uint64 `json:"log_flush_interval_ms,omitempty"` + LogIndexIntervalBytes *int `json:"log_index_interval_bytes,omitempty"` + LogMessageDownconversionEnable *bool `json:"log_message_downconversion_enable,omitempty"` + LogMessageTimestampDifferenceMaxMs *uint64 `json:"log_message_timestamp_difference_max_ms,omitempty"` + LogPreallocate *bool `json:"log_preallocate,omitempty"` + LogRetentionBytes *int64 `json:"log_retention_bytes,omitempty"` + LogRetentionHours *int `json:"log_retention_hours,omitempty"` + LogRetentionMs *int64 `json:"log_retention_ms,omitempty"` + LogRollJitterMs *int64 `json:"log_roll_jitter_ms,omitempty"` + LogSegmentDeleteDelayMs *int `json:"log_segment_delete_delay_ms,omitempty"` + AutoCreateTopicsEnable *bool `json:"auto_create_topics_enable,omitempty"` } type databaseUserRoot struct { diff --git a/databases_test.go b/databases_test.go index 90410ab..f1bfb7c 100644 --- a/databases_test.go +++ b/databases_test.go @@ -3101,10 +3101,10 @@ func TestDatabases_GetConfigKafka(t *testing.T) { MessageMaxBytes: PtrTo(1048588), LogCleanerDeleteRetentionMs: PtrTo(int64(86400000)), LogCleanerMinCompactionLagMs: PtrTo(int64(0)), - LogFlushIntervalMs: PtrTo(int64(60000)), + LogFlushIntervalMs: PtrTo(uint64(60000)), LogIndexIntervalBytes: PtrTo(4096), LogMessageDownconversionEnable: PtrTo(true), - LogMessageTimestampDifferenceMaxMs: PtrTo(int64(120000)), + LogMessageTimestampDifferenceMaxMs: PtrTo(uint64(120000)), LogPreallocate: PtrTo(false), LogRetentionBytes: PtrTo(int64(-1)), LogRetentionHours: PtrTo(168),