Skip to content

Commit

Permalink
GG-18882 Web Console: Fixed collecting queries history.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsisko authored and akuznetsov-os committed Jun 5, 2019
1 parent 158efcd commit ab733d9
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.binary.BinaryObjectEx;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
import org.apache.ignite.internal.processors.query.GridQueryCancel;
import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
Expand Down Expand Up @@ -373,15 +374,19 @@ public static void scheduleQueryStart(

String cacheName = arg.getCacheName();

if (!F.isEmpty(cacheName))
GridCacheContext cctx = null;

if (!F.isEmpty(cacheName)) {
qry.setSchema(cacheName);
cctx = ignite.context().cache().cache(cacheName).context();
}

long start = U.currentTimeMillis();

List<FieldsQueryCursor<List<?>>> qryCursors = ignite
.context()
.query()
.querySqlFields(null, qry, null, true, false, cancel);
.querySqlFields(cctx, qry, null, true, false, cancel);

// In case of multiple statements leave opened only last cursor.
for (int i = 0; i < qryCursors.size() - 1; i++)
Expand Down

0 comments on commit ab733d9

Please sign in to comment.