Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not break snapshots into multiple record batches (yet) #3866

Merged
merged 4 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.deephaven.engine.table.TableDefinition;
import io.deephaven.engine.updategraph.NotificationQueue;
import io.deephaven.engine.updategraph.WaitNotification;
import io.deephaven.proto.backplane.grpc.Config;
import io.deephaven.time.DateTime;
import io.deephaven.util.datastructures.LongSizedDataStructure;
import io.deephaven.engine.liveness.LivenessManager;
Expand Down Expand Up @@ -79,7 +80,10 @@ public NoSnapshotAllowedException(String reason) {
private static final int MAX_CONCURRENT_ATTEMPT_DURATION_MILLIS = Configuration.getInstance()
.getIntegerWithDefault("ConstructSnapshot.maxConcurrentAttemptDurationMillis", 5000);

public static final int SNAPSHOT_CHUNK_SIZE = ChunkPoolConstants.LARGEST_POOLED_CHUNK_CAPACITY;
// TODO (deephaven-core#188): use ChunkPoolConstants.LARGEST_POOL_CHUNK_CAPACITY when JS API allows multiple batches
// default enables more than 100MB of 8-byte values in a single record batch
public static final int SNAPSHOT_CHUNK_SIZE = Configuration.getInstance()
.getIntegerWithDefault("ConstructSnapshot.snapshotChunkSize", 1 << 24);

/**
* Holder for thread-local state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ private void processBatches(Consumer<InputStream> visitor, final View view,
final int maxMessageSize =
view.clientMaxMessageSize() > 0 ? view.clientMaxMessageSize() : DEFAULT_MESSAGE_SIZE_LIMIT;

// TODO: remove this when JS API can accept multiple batches
// TODO (deephaven-core#188): remove this when JS API can accept multiple batches
boolean sendAllowed = numRows <= batchSize;

while (offset < numRows) {
Expand Down