Skip to content

Commit 49ac06e

Browse files
committed
Revert "allocator: zero limit in SetExiting for backward compatibility"
This reverts commit a070522. Allocator deployments going forward must first have been running release v0.102.0 prior to deploying on this commit.
1 parent 1ebeffa commit 49ac06e

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

allocator/allocator_key_space_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ type testMember struct {
361361

362362
func (m testMember) ItemLimit() int { return m.R }
363363
func (m testMember) Validate() error { return nil }
364-
// TODO(whb): Zero'ing R is for backward compatibility; remove once deployment is complete.
365-
func (m *testMember) SetExiting() { m.E = true; m.R = 0 }
364+
func (m *testMember) SetExiting() { m.E = true }
366365
func (m testMember) IsExiting() bool { return m.E }
367366

368367
func (m *testMember) MarshalString() string {

allocator/announce_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ func (s *AnnounceSuite) TestBasicSessionStart(c *gc.C) {
127127
close(sigCh)
128128

129129
c.Check(args.Tasks.Wait(), gc.IsNil) // All tasks have exited.
130-
c.Check(spec.E, gc.Equals, true) // Member was marked as exiting.
131-
c.Check(spec.R, gc.Equals, 0) // TODO(whb): Remove once backward compat is removed.
130+
c.Check(spec.E, gc.Equals, true) // Member was marked as exiting.
132131

133132
leasesResp, err := etcd.Leases(context.Background())
134133
c.Check(err, gc.IsNil)

broker/protocol/broker_spec_extensions.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ func (m *BrokerSpec) ItemLimit() int { return int(m.JournalLimit) }
5656
func (m *BrokerSpec) IsExiting() bool { return m.Exiting }
5757

5858
// SetExiting marks this BrokerSpec as exiting.
59-
// TODO(whb): Zero'ing JournalLimit is for backward compatibility; remove once
60-
// deployment is complete.
61-
func (m *BrokerSpec) SetExiting() { m.Exiting = true; m.JournalLimit = 0 }
59+
func (m *BrokerSpec) SetExiting() { m.Exiting = true }
6260

6361
const (
6462
minZoneLen = 1

consumer/protocol/shard_spec_extensions.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,7 @@ func (m *ConsumerSpec) ItemLimit() int { return int(m.ShardLimit) }
289289
func (m *ConsumerSpec) IsExiting() bool { return m.Exiting }
290290

291291
// SetExiting marks this ConsumerSpec as exiting.
292-
// TODO(whb): Zero'ing ShardLimit is for backward compatibility; remove once
293-
// deployment is complete.
294-
func (m *ConsumerSpec) SetExiting() { m.Exiting = true; m.ShardLimit = 0 }
292+
func (m *ConsumerSpec) SetExiting() { m.Exiting = true }
295293

296294
// Reduce folds another ReplicaStatus into this one.
297295
func (m *ReplicaStatus) Reduce(other *ReplicaStatus) {

0 commit comments

Comments
 (0)