Skip to content

Commit

Permalink
ARROW-11066: Revert "ARROW-11066: [Java][FlightRPC] fix zero-copy opt…
Browse files Browse the repository at this point in the history
…imization"

This reverts commit c3e3073.

This breaks causes JVM crash on the mac.
  • Loading branch information
emkornfield committed Feb 1, 2021
1 parent 3c03531 commit 03e97ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.arrow.flight.grpc;

import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -87,8 +88,11 @@ public class AddWritableBuffer {
* @param buf The buffer to add.
* @param stream The Candidate OutputStream to add to.
* @return True if added. False if not possible.
* @throws IOException on error
*/
public static boolean add(ByteBuf buf, OutputStream stream) {
public static boolean add(ByteBuf buf, OutputStream stream) throws IOException {
buf.readBytes(stream, buf.readableBytes());

if (bufChainOut == null) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void register(FlightProducer.ServerStreamListener listener) {

@Override
public WaitResult waitForListener(long timeout) {
while (!listener.isReady() && !listener.isCancelled()) {
while (!listener.isReady()) {
// busy wait
}
return WaitResult.READY;
Expand Down

0 comments on commit 03e97ff

Please sign in to comment.