We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60c6504 commit 9ac8438Copy full SHA for 9ac8438
src/query/catalog/src/cluster_info.rs
@@ -24,13 +24,20 @@ pub struct Cluster {
24
impl Cluster {
25
/// If this cluster is empty?
26
///
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
34
/// # TODO
35
36
/// From @Xuanwo
37
38
/// Ideally, we should implement a cluster trait to replace `ClusterHelper`
39
/// defined in `databend-query`.
40
pub fn is_empty(&self) -> bool {
- self.nodes.is_empty()
41
+ self.nodes.len() <= 1
42
}
43
0 commit comments