Skip to content

Commit 04ddecb

Browse files
committed
cluster: add is_cancelled_state
(cherry picked from commit de73100)
1 parent ae9a71b commit 04ddecb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/v/cluster/types.h

+13
Original file line numberDiff line numberDiff line change
@@ -3805,6 +3805,19 @@ enum class reconfiguration_state {
38053805
force_cancelled = 3
38063806
};
38073807

3808+
inline bool is_cancelled_state(reconfiguration_state rs) {
3809+
switch (rs) {
3810+
case reconfiguration_state::in_progress:
3811+
case reconfiguration_state::force_update:
3812+
return false;
3813+
case reconfiguration_state::cancelled:
3814+
case reconfiguration_state::force_cancelled:
3815+
return true;
3816+
default:
3817+
__builtin_unreachable();
3818+
}
3819+
}
3820+
38083821
std::ostream& operator<<(std::ostream&, reconfiguration_state);
38093822

38103823
struct replica_bytes {

0 commit comments

Comments
 (0)