Skip to content

Commit

Permalink
Add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sakthivelmanii committed Jan 6, 2025
1 parent fa7025d commit 7c869a5
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,14 @@ public void run() {
// Non-streaming result sets do not trigger this callback, and for those result sets, we
// need to eagerly start the ProduceRowsRunnable.
synchronized (monitor) {
if (state == State.STREAMING_STARTED || state == State.RUNNING || state == State.CONSUMING) {
if (state == State.STREAMING_STARTED
|| state == State.RUNNING
|| state == State.CONSUMING) {
return;
}
state = State.STREAMING_STARTED;
System.out.printf("State: %s\n", state);
if (state == State.STREAMING_INITIALIZED) {
state = State.STREAMING_STARTED;
}
if (!initiateStreaming(AsyncResultSetImpl.this)) {
initiateProduceRows();
}
Expand Down Expand Up @@ -657,7 +660,7 @@ public void onStreamMessage(PartialResultSet partialResultSet, boolean bufferIsF
!partialResultSet.getResumeToken().isEmpty()
|| bufferIsFull
|| partialResultSet == GrpcStreamIterator.END_OF_STREAM;
if (startJobThread || state != State.STREAMING_INITIALIZED) {
if (startJobThread || state != State.STREAMING_STARTED) {
initiateProduceRows();
}
}
Expand Down

0 comments on commit 7c869a5

Please sign in to comment.