@Override
    public boolean mayHaveMergesPending(String bucketSpace, int contentNodeIndex) {
        if (!stats.hasUpdatesFromAllDistributors()) {
            return true;
        }
        ContentNodeStats nodeStats = stats.getStats().getNodeStats(contentNodeIndex);
        if (nodeStats != null) {
            ContentNodeStats.BucketSpaceStats bucketSpaceStats = nodeStats.getBucketSpace(bucketSpace);
            return (bucketSpaceStats != null &&
                    bucketSpaceStats.mayHaveBucketsPending(minMergeCompletionRatio));
        }
        return true;
    }
@Test
    void min_merge_completion_ratio_is_used_when_calculating_may_have_merges_pending() {
        // Completion ratio is (5-3)/5 = 0.4
        assertTrue(Fixture.fromBucketsPending(3, 0.6).mayHaveMergesPending("default", 1));
        // Completion ratio is (5-2)/5 = 0.6
        assertFalse(Fixture.fromBucketsPending(2, 0.6).mayHaveMergesPending("default", 1));
    }