From 354049a6faf41a0698cb0c29952559e0806f8370 Mon Sep 17 00:00:00 2001 From: Daniel Weinshenker Date: Tue, 14 Nov 2023 10:25:51 -0800 Subject: [PATCH] remove unclean_leader_election_enable --- args.go | 2 -- commands/databases.go | 7 ------- commands/displayers/database.go | 6 ------ 3 files changed, 15 deletions(-) diff --git a/args.go b/args.go index e4cd0ca709..b1beb074f6 100644 --- a/args.go +++ b/args.go @@ -435,8 +435,6 @@ const ( ArgDatabaseTopicSegmentJitterMS = "segment-jitter-ms" // ArgDatabaseTopicSegmentMS is the period of time, in ms, after which the log will be forced to roll if the segment file isn't full ArgDatabaseTopicSegmentMS = "segment-ms" - // ArgDatabaseTopicUncleanLeaderElectionEnable determines whether to allow replicas that are not insync to be elected as leaders as last resort - ArgDatabaseTopicUncleanLeaderElectionEnable = "unclean-leader-election-enable" // ArgPrivateNetworkUUID is the flag for VPC UUID ArgPrivateNetworkUUID = "private-network-uuid" diff --git a/commands/databases.go b/commands/databases.go index 06b1ebc1a7..ef5ff738cd 100644 --- a/commands/databases.go +++ b/commands/databases.go @@ -1806,10 +1806,6 @@ func getDatabaseTopicConfigArgs(c *CmdConfig) *godo.TopicConfig { res.SegmentMS = &i } } - bVal, err = c.Doit.GetBoolPtr(c.NS, doctl.ArgDatabaseTopicUncleanLeaderElectionEnable) - if err == nil && bVal != nil { - res.UncleanLeaderElectionEnable = bVal - } return res } @@ -1905,9 +1901,6 @@ This command lists the following details for each partition of a given topic in "Specifies the maximum time (in ms) for random jitter that is subtracted from the scheduled segment roll time to avoid thundering herd problems") AddStringFlag(c, doctl.ArgDatabaseTopicSegmentMS, "", "", "Specifies the maximum time (in ms) to wait to force a log roll if the segment file isn't full. After this period, the log will be forced to roll") - AddBoolFlag(c, doctl.ArgDatabaseTopicUncleanLeaderElectionEnable, "", false, - "Specifies whether to allow replicas that are not insync to be elected as leader as a last resort. This may result in data loss since those leaders are not in sync") - } return cmd } diff --git a/commands/displayers/database.go b/commands/displayers/database.go index 682982ac11..ea9c6207a8 100644 --- a/commands/displayers/database.go +++ b/commands/displayers/database.go @@ -963,12 +963,6 @@ func (dt *DatabaseKafkaTopic) KV() []map[string]interface{} { "value": *t.Config.SegmentMS, }) } - if t.Config.UncleanLeaderElectionEnable != nil { - cfg = append(cfg, map[string]interface{}{ - "key": "UncleanLeaderElectionEnable", - "value": *t.Config.UncleanLeaderElectionEnable, - }) - } o = append(o, cfg...) }