Author: jolee
Date: 2014-01-10 09:47:35 -0500 (Fri, 10 Jan 2014)
New Revision: 4620
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
TEIID-2797: buffer full requests is not cleaned up properly
Modified: branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
---
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2013-12-23
19:43:47 UTC (rev 4619)
+++
branches/7.7.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2014-01-10
14:47:35 UTC (rev 4620)
@@ -70,15 +70,15 @@
import org.teiid.dqp.message.RequestID;
import org.teiid.dqp.service.BufferService;
import org.teiid.dqp.service.TransactionContext;
+import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.dqp.service.TransactionService;
-import org.teiid.dqp.service.TransactionContext.Scope;
import org.teiid.events.EventDistributor;
import org.teiid.jdbc.EnhancedTimer;
import org.teiid.logging.CommandLogMessage;
+import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
-import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.metadata.MetadataRepository;
import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.QueryProcessor;
@@ -206,7 +206,7 @@
private int currentlyActivePlans;
private int userRequestSourceConcurrency;
private LinkedList<RequestWorkItem> waitingPlans = new
LinkedList<RequestWorkItem>();
- private LinkedHashSet<RequestWorkItem> bufferFullPlans = new
LinkedHashSet<RequestWorkItem>();
+ LinkedHashSet<RequestWorkItem> bufferFullPlans = new
LinkedHashSet<RequestWorkItem>();
private CacheFactory cacheFactory;
private AuthorizationValidator authorizationValidator;
@@ -424,7 +424,7 @@
}
workItem.active = false;
currentlyActivePlans--;
- bufferFullPlans.remove(workItem.requestID);
+ bufferFullPlans.remove(workItem);
if (!waitingPlans.isEmpty()) {
startActivePlan(waitingPlans.remove(), true);
}
Modified:
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
---
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2013-12-23
19:43:47 UTC (rev 4619)
+++
branches/7.7.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2014-01-10
14:47:35 UTC (rev 4620)
@@ -42,8 +42,8 @@
import org.teiid.cache.CacheConfiguration;
import org.teiid.cache.DefaultCacheFactory;
import org.teiid.client.RequestMessage;
+import org.teiid.client.RequestMessage.StatementType;
import org.teiid.client.ResultsMessage;
-import org.teiid.client.RequestMessage.StatementType;
import org.teiid.client.lob.LobChunk;
import org.teiid.client.util.ResultsFuture;
import org.teiid.common.buffer.BufferManager;
@@ -345,6 +345,8 @@
break;
}
}
+
+ assertTrue(this.core.bufferFullPlans.isEmpty());
//insensitive should not block
reqMsg.setCursorType(ResultSet.TYPE_SCROLL_INSENSITIVE);
Show replies by date