Skip to content

Commit

Permalink
Refactor ApplicationServiceGrpcImpl, don't keep hard ref to table
Browse files Browse the repository at this point in the history
Fixes #2130
  • Loading branch information
devinrsmith committed Mar 31, 2022
1 parent d06d24b commit d1eff29
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 187 deletions.
6 changes: 3 additions & 3 deletions docker-compose-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
# with max memory.
#
# To turn on debug logging, add: -Dlogback.configurationFile=logback-debug.xml
- JAVA_TOOL_OPTIONS=-Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -DCleanupReferenceProcessor.logCleanedReferences=true -Xlog:gc -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
#
# For remote debugging switch the line above for the one below (and also change the ports below)
# - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -Xmx4g -Ddeephaven.console.type=${DEEPHAVEN_CONSOLE_TYPE} -Ddeephaven.application.dir=${DEEPHAVEN_APPLICATION_DIR}
Expand All @@ -25,8 +25,8 @@ services:
expose:
- '8080'
# For remote debugging (change if using different port)
# ports:
# - '5005:5005'
ports:
- '5005:5005'
# For jprofiler (change if using different port)
# ports:
# - '8849:8849'
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ services:
extends:
file: docker-compose-common.yml
service: server
extra_hosts:
- "redpanda:host-gateway"

web:
extends:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
/**
* Adapter for converting streams of data into columnar Deephaven {@link Table tables}.
*/
public class StreamToTableAdapter extends ReferenceCountedLivenessNode implements SafeCloseable, StreamConsumer, Runnable {
public class StreamToTableAdapter extends ReferenceCountedLivenessNode
implements SafeCloseable, StreamConsumer, Runnable {

private static final Logger log = LoggerFactory.getLogger(StreamToTableAdapter.class);

Expand Down Expand Up @@ -324,12 +325,12 @@ private void doRefresh() {
if (capturedBufferSources == null) {
// null out our current values
for (int ii = 0; ii < switchSources.length; ++ii) {
//noinspection unchecked
// noinspection unchecked
switchSources[ii].setNewCurrent((ColumnSource) nullColumnSources[ii]);
}
} else {
for (int ii = 0; ii < switchSources.length; ++ii) {
//noinspection unchecked
// noinspection unchecked
switchSources[ii].setNewCurrent((ColumnSource) capturedBufferSources[ii]);
}
}
Expand All @@ -347,7 +348,8 @@ private void doRefresh() {
if (localTable != null) {
localTable.notifyListeners(new TableUpdateImpl(RowSetFactory.flat(newSize),
RowSetFactory.flat(oldSize), RowSetFactory.empty(),
RowSetShiftData.EMPTY, ModifiedColumnSet.EMPTY)); }
RowSetShiftData.EMPTY, ModifiedColumnSet.EMPTY));
}
}

@SafeVarargs
Expand Down
Loading

0 comments on commit d1eff29

Please sign in to comment.