Skip to content

Commit 9ac8438

Browse files
committed
Fix check
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 60c6504 commit 9ac8438

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/query/catalog/src/cluster_info.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ pub struct Cluster {
2424
impl Cluster {
2525
/// If this cluster is empty?
2626
///
27+
/// # Note
28+
///
29+
/// Cluster empty means:
30+
///
31+
/// - There is no active node (is this possible?).
32+
/// - There is only one node (myself).
33+
///
2734
/// # TODO
2835
///
2936
/// From @Xuanwo
3037
///
3138
/// Ideally, we should implement a cluster trait to replace `ClusterHelper`
3239
/// defined in `databend-query`.
3340
pub fn is_empty(&self) -> bool {
34-
self.nodes.is_empty()
41+
self.nodes.len() <= 1
3542
}
3643
}

0 commit comments

Comments
 (0)