Author: rareddy
Date: 2011-04-20 16:03:25 -0400 (Wed, 20 Apr 2011)
New Revision: 3108
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
Log:
TEIID-1564: Couple issues fixed. 1) after the replication of contents the tuple was not
closed before. 2) on node2, it was always submitting a async job for retrieval of the
contents, when the data is not already fetched it should be a blocking call.
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-04-20
19:43:03 UTC (rev 3107)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2011-04-20
20:03:25 UTC (rev 3108)
@@ -150,6 +150,7 @@
}
this.results = buffer;
bufferManager.addTupleBuffer(this.results);
+ this.results.close();
}
this.accessInfo.restore();
return true;
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-04-20
19:43:03 UTC (rev 3107)
+++
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-04-20
20:03:25 UTC (rev 3108)
@@ -412,10 +412,11 @@
key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
MatTableEntry entry = this.tables.get(key);
+ boolean firstload = !info.isValid();
if (entry != null && entry.lastUpdate > info.getUpdateTime()
&& info.getState() != MatState.LOADING) {
//remote load
- info.setState(MatState.NEEDS_LOADING, entry.valid, null);
+ info.setState(MatState.NEEDS_LOADING, firstload?false:entry.valid, null);
loadTime = entry.lastUpdate;
}
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java 2011-04-20
19:43:03 UTC (rev 3107)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCachedResults.java 2011-04-20
20:03:25 UTC (rev 3108)
@@ -100,6 +100,7 @@
TupleBuffer cachedTb = cachedResults.getResults();
+ assertTrue(cachedTb.isFinal());
assertEquals(tb.getRowCount(), cachedTb.getRowCount());
assertEquals(tb.getBatchSize(), cachedTb.getBatchSize());
Show replies by date