Search in sources :

Example 1 with IndexRebuildFutureStorage

use of org.apache.ignite.internal.processors.query.aware.IndexRebuildFutureStorage in project ignite by apache.

the class ForceRebuildIndexTest method checkRebuildAfterExchange.

/**
 * Checking the contents of the cache in {@code GridQueryProcessor#idxRebuildOnExchange}.
 * Allows to check if the cache will be marked, that the rebuild for it should be after the exchange.
 *
 * @param n Node.
 * @param cacheId Cache id.
 * @param expContains Whether a cache is expected.
 */
private void checkRebuildAfterExchange(IgniteEx n, int cacheId, boolean expContains) {
    IndexRebuildFutureStorage idxRebuildAware = getFieldValue(n.context().query(), "idxRebuildFutStorage");
    GridDhtPartitionsExchangeFuture exhFut = n.context().cache().context().exchange().lastTopologyFuture();
    assertEquals(expContains, idxRebuildAware.rebuildIndexesOnExchange(cacheId, exhFut.initialVersion()));
}
Also used : GridDhtPartitionsExchangeFuture(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture) IndexRebuildFutureStorage(org.apache.ignite.internal.processors.query.aware.IndexRebuildFutureStorage)

Aggregations

GridDhtPartitionsExchangeFuture (org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture)1 IndexRebuildFutureStorage (org.apache.ignite.internal.processors.query.aware.IndexRebuildFutureStorage)1