Skip to content

Commit

Permalink
0000700: StackOverflowError when filtering data during initial load
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Jul 19, 2012
1 parent a137711 commit d208fb7
Showing 1 changed file with 18 additions and 12 deletions.
Expand Up @@ -854,6 +854,23 @@ public Table getTable() {
}

public CsvData next() {
CsvData data = null;
do {
data = selectNext();
} while (data != null && routingContext != null
&& !routerService.shouldDataBeRouted(routingContext, new DataMetaData(
(Data) data, currentTable, triggerRouter, routingContext.getChannel()),
node, true));

if (data != null && outgoingBatch != null) {
outgoingBatch.incrementDataEventCount();
outgoingBatch.incrementEventCount(data.getDataEventType());
}

return data;
}

protected CsvData selectNext() {
CsvData data = null;
if (this.currentInitialLoadEvent == null && selectFromTableEventsToSend.size() > 0) {
this.currentInitialLoadEvent = selectFromTableEventsToSend.remove(0);
Expand Down Expand Up @@ -882,23 +899,12 @@ public CsvData next() {

if (this.cursor != null) {
data = this.cursor.next();
if (data != null) {
if (!routerService.shouldDataBeRouted(routingContext, new DataMetaData(
(Data) data, currentTable, triggerRouter, routingContext.getChannel()),
node, true)) {
data = next();
}
} else {
if (data == null) {
closeCursor();
data = next();
}
}

if (data != null && outgoingBatch != null) {
outgoingBatch.incrementDataEventCount();
outgoingBatch.incrementEventCount(data.getDataEventType());
}

return data;
}

Expand Down

0 comments on commit d208fb7

Please sign in to comment.