Skip to content

Commit bcb5623

Browse files
committed
WIP c/leader_balancer: reorder class fields
1 parent 5585331 commit bcb5623

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

src/v/cluster/scheduling/leader_balancer.h

+18-14
Original file line numberDiff line numberDiff line change
@@ -185,20 +185,6 @@ class leader_balancer {
185185

186186
config::binding<model::leaders_preference> _default_preference;
187187

188-
struct last_known_leader {
189-
model::broker_shard shard;
190-
clock_type::time_point expires;
191-
};
192-
absl::btree_map<raft::group_id, last_known_leader> _last_leader;
193-
194-
leader_balancer_probe _probe;
195-
bool _need_controller_refresh{true};
196-
bool _throttled{false};
197-
absl::btree_map<raft::group_id, clock_type::time_point> _muted;
198-
cluster::notification_id_type _leader_notify_handle;
199-
std::optional<cluster::notification_id_type>
200-
_leadership_change_notify_handle;
201-
cluster::notification_id_type _maintenance_state_notify_handle;
202188
topic_table& _topics;
203189
partition_leaders_table& _leaders;
204190
members_table& _members;
@@ -209,15 +195,33 @@ class leader_balancer {
209195
ss::sharded<partition_manager>& _partition_manager;
210196
ss::sharded<ss::abort_source>& _as;
211197
consensus_ptr _raft0;
198+
199+
cluster::notification_id_type _leader_notify_handle;
200+
std::optional<cluster::notification_id_type>
201+
_leadership_change_notify_handle;
202+
cluster::notification_id_type _maintenance_state_notify_handle;
203+
212204
ss::gate _gate;
213205
ss::timer<clock_type> _timer;
214206

207+
struct last_known_leader {
208+
model::broker_shard shard;
209+
clock_type::time_point expires;
210+
};
211+
absl::btree_map<raft::group_id, last_known_leader> _last_leader;
212+
213+
bool _need_controller_refresh{true};
214+
bool _throttled{false};
215+
absl::btree_map<raft::group_id, clock_type::time_point> _muted;
216+
215217
struct in_flight_reassignment {
216218
reassignment value;
217219
clock_type::time_point expires;
218220
};
219221
absl::flat_hash_map<raft::group_id, in_flight_reassignment>
220222
_in_flight_changes;
223+
224+
leader_balancer_probe _probe;
221225
};
222226

223227
} // namespace cluster

0 commit comments

Comments
 (0)