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()));
}
Aggregations