Skip to content

Commit

Permalink
GRPC agents: relax more limits
Browse files Browse the repository at this point in the history
  • Loading branch information
eolivelli committed Dec 13, 2023
1 parent 651eec5 commit c05e0a6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ public void start() throws Exception {
throw new IllegalStateException("Channel not initialized");
}
blockingStub =
AgentServiceGrpc.newBlockingStub(channel).withDeadlineAfter(30, TimeUnit.SECONDS);
AgentServiceGrpc.newBlockingStub(channel)
.withMaxInboundMessageSize(Integer.MAX_VALUE)
.withMaxOutboundMessageSize(Integer.MAX_VALUE)
.withDeadlineAfter(30, TimeUnit.SECONDS);
asyncStub =
AgentServiceGrpc.newStub(channel)
.withWaitForReady()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ public synchronized void onNewSchemaToSend(Schema schema) {
@Override
public void start() throws Exception {
super.start();
request = AgentServiceGrpc.newStub(channel).withWaitForReady().process(responseObserver);
request =
AgentServiceGrpc.newStub(channel)
.withMaxInboundMessageSize(Integer.MAX_VALUE)
.withMaxOutboundMessageSize(Integer.MAX_VALUE)
.withWaitForReady()
.process(responseObserver);
restarting.set(false);
startFailedButDevelopmentMode = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ public void onNewSchemaToSend(Schema schema) {
@Override
public void start() throws Exception {
super.start();
request = AgentServiceGrpc.newStub(channel).withWaitForReady().write(responseObserver);
request =
AgentServiceGrpc.newStub(channel)
.withMaxInboundMessageSize(Integer.MAX_VALUE)
.withMaxOutboundMessageSize(Integer.MAX_VALUE)
.withWaitForReady()
.write(responseObserver);
restarting.set(false);
startFailedButDevelopmentMode = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ public void onNewSchemaToSend(Schema schema) {
@Override
public void start() throws Exception {
super.start();
request = AgentServiceGrpc.newStub(channel).withWaitForReady().read(responseObserver);
request =
AgentServiceGrpc.newStub(channel)
.withMaxInboundMessageSize(Integer.MAX_VALUE)
.withMaxOutboundMessageSize(Integer.MAX_VALUE)
.withWaitForReady()
.read(responseObserver);
restarting.set(false);
startFailedButDevelopmentMode = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public ManagedChannel start() throws Exception {
ManagedChannel channel =
ManagedChannelBuilder.forAddress("localhost", port).usePlaintext().build();
AgentServiceGrpc.AgentServiceBlockingStub stub =
AgentServiceGrpc.newBlockingStub(channel).withDeadlineAfter(30, TimeUnit.SECONDS);
AgentServiceGrpc.newBlockingStub(channel)
.withMaxInboundMessageSize(Integer.MAX_VALUE)
.withMaxOutboundMessageSize(Integer.MAX_VALUE)
.withDeadlineAfter(30, TimeUnit.SECONDS);
for (int i = 0; ; i++) {
try {
stub.agentInfo(Empty.getDefaultInstance());
Expand Down

0 comments on commit c05e0a6

Please sign in to comment.