void prioritizeCopiesAndShiftUps(List<MigrationInfo> migrations) {
        for (int i = 0; i < migrations.size(); i++) {
            prioritize(migrations, i);
        }

        if (logger.isFinestEnabled()) {
            StringBuilder s = new StringBuilder("Migration order after prioritization: [");
            int ix = 0;
            for (MigrationInfo migration : migrations) {
                s.append("\n\t").append(ix++).append("- ").append(migration).append(",");
            }
            s.deleteCharAt(s.length() - 1);
            s.append("]");
            logger.finest(s.toString());
        }
    }
void prioritizeCopiesAndShiftUps ( List < MigrationInfo > migrations ) { for ( int i = 0 ; i < migrations . size ( ) ; i ++ ) { prioritize ( migrations , i ) ; } if ( logger . isFinestEnabled ( ) ) { StringBuilder s = new StringBuilder ( "Migration order after prioritization: [" ) ; int ix = 0 ; for ( MigrationInfo migration : migrations ) { s . append ( "\n\t" ) . append ( ix ++ ) . append ( "- " ) . append ( migration ) . append ( "," ) ; } s . deleteCharAt ( s . length ( ) - 1 ) ; s . append ( "]" ) ; logger . finest ( s . toString ( ) ) ; } }
Prioritizes a COPY / SHIFT UP migration against
- a non-conflicting MOVE migration on a hotter index,
- a non-conflicting SHIFT DOWN migration to a colder index.
Non-conflicting migrations have no common participant. Otherwise, order of the migrations should not be changed.
This method is called for migrations per partition.
<p>
The main motivation of the prioritization is COPY / SHIFT UP migrations increase
the available replica count of a migration while a MOVE migration doesn't have an effect on it.

@param migrations migrations to perform prioritization