You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/database.ts
+272Lines changed: 272 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -661,6 +661,176 @@ export type QueryInfo = {
661
661
stream: boolean;
662
662
};
663
663
664
+
/**
665
+
* Information about a cluster imbalance.
666
+
*/
667
+
exporttypeClusterImbalanceInfo={
668
+
/**
669
+
* Information about the leader imbalance.
670
+
*/
671
+
leader: {
672
+
/**
673
+
* The weight of leader shards per DB-Server. A leader has a weight of 1 by default but it is higher if collections can only be moved together because of `distributeShardsLike`.
674
+
*/
675
+
weightUsed: number[];
676
+
/**
677
+
* The ideal weight of leader shards per DB-Server.
678
+
*/
679
+
targetWeight: number[];
680
+
/**
681
+
* The number of leader shards per DB-Server.
682
+
*/
683
+
numberShards: number[];
684
+
/**
685
+
* The measure of the leader shard distribution. The higher the number, the worse the distribution.
686
+
*/
687
+
leaderDupl: number[];
688
+
/**
689
+
* The sum of all weights.
690
+
*/
691
+
totalWeight: number;
692
+
/**
693
+
* The measure of the total imbalance. A high value indicates a high imbalance.
694
+
*/
695
+
imbalance: number;
696
+
/**
697
+
* The sum of shards, counting leader shards only.
698
+
*/
699
+
totalShards: number;
700
+
};
701
+
/**
702
+
* Information about the shard imbalance.
703
+
*/
704
+
shards: {
705
+
/**
706
+
* The size of shards per DB-Server.
707
+
*/
708
+
sizeUsed: number[];
709
+
/**
710
+
* The ideal size of shards per DB-Server.
711
+
*/
712
+
targetSize: number[];
713
+
/**
714
+
* The number of leader and follower shards per DB-Server.
715
+
*/
716
+
numberShards: number[];
717
+
/**
718
+
* The sum of the sizes.
719
+
*/
720
+
totalUsed: number;
721
+
/**
722
+
* The sum of shards, counting leader and follower shards.
723
+
*/
724
+
totalShards: number;
725
+
/**
726
+
* The sum of system collection shards, counting leader shards only.
727
+
*/
728
+
totalShardsFromSystemCollections: number;
729
+
/**
730
+
* The measure of the total imbalance. A high value indicates a high imbalance.
731
+
*/
732
+
imbalance: number;
733
+
};
734
+
};
735
+
736
+
/**
737
+
* Information about the current state of the cluster imbalance.
0 commit comments