AMashenkov commented on a change in pull request #9086:
URL: https://github.com/apache/ignite/pull/9086#discussion_r638601459
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
##########
@@ -264,25 +266,7 @@ protected void onNodeLeft(UUID evtNodeId) {
protected void enqueue(Collection<?> col) {
assert Thread.holdsLock(this);
- if (limitDisabled) {
- queue.add((Collection<R>)col);
-
- cnt.addAndGet(col.size());
- }
- else {
- if (capacity >= col.size()) {
- queue.add((Collection<R>)col);
- capacity -= col.size();
-
- cnt.addAndGet(col.size());
- }
- else if (capacity > 0) {
- queue.add(new ArrayList<>((Collection<R>)col).subList(0,
capacity));
- capacity = 0;
-
- cnt.addAndGet(capacity);
- }
- }
+ queue.add((Collection<R>)col);
Review comment:
Why are you remove limit tracking from here?
Seems, onDone() + cancel() methods could be called when the limit was
reached.
onDone() will prevent requesting next pages (loadPage()), and cancel() will
free resources on map nodes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]