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

Empty for Avro #79

Closed
juanpedromoreno opened this issue Nov 7, 2017 · 0 comments · Fixed by #87
Closed

Empty for Avro #79

juanpedromoreno opened this issue Nov 7, 2017 · 0 comments · Fixed by #87
Labels
bug Something isn't working

Comments

@juanpedromoreno
Copy link
Member

juanpedromoreno commented Nov 7, 2017

Currently, freestyle.rpc.protocol.Empty is valid for Protocol Buffers, but it is not for Avro.

Using freestyle.rpc.protocol.Empty we can found OOM errors like this one:

[error] (grpc-default-executor-0) java.lang.OutOfMemoryError: GC overhead limit exceeded
[error] java.lang.OutOfMemoryError: GC overhead limit exceeded
[error] 	at org.apache.avro.generic.GenericData.newRecord(GenericData.java:1145)
[error] 	at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:220)
[error] 	at org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:174)
[error] 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:152)
[error] 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:144)
[error] 	at com.sksamuel.avro4s.AvroBinaryInputStream.<init>(AvroInputStream.scala:30)
[error] 	at com.sksamuel.avro4s.AvroInputStream$.binary(AvroInputStream.scala:111)
[error] 	at freestyle.rpc.internal.service.encoders$avro$$anon$2.parse(service.scala:271)
[error] 	at io.grpc.MethodDescriptor.parseRequest(MethodDescriptor.java:283)
[error] 	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:251)
[error] 	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:592)
[error] 	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
[error] 	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:107)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (grpc-default-executor-2) java.lang.OutOfMemoryError: GC overhead limit exceeded
[error] java.lang.OutOfMemoryError: GC overhead limit exceeded
[error] 	at org.apache.avro.generic.GenericData$Record.<init>(GenericData.java:182)
[error] 	at org.apache.avro.generic.GenericData.newRecord(GenericData.java:1145)
[error] 	at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:220)
[error] 	at org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:174)
[error] 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:152)
[error] 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:144)
[error] 	at com.sksamuel.avro4s.AvroBinaryInputStream.<init>(AvroInputStream.scala:30)
[error] 	at com.sksamuel.avro4s.AvroInputStream$.binary(AvroInputStream.scala:111)
[error] 	at freestyle.rpc.internal.service.encoders$avro$$anon$2.parse(service.scala:271)
[error] 	at io.grpc.MethodDescriptor.parseRequest(MethodDescriptor.java:283)
[error] 	at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:251)
[error] 	at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:592)
[error] 	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
[error] 	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:107)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] 	at java.lang.Thread.run(Thread.java:748)

However, using this type, the issue is gone.

case class EmptyAvro(b: String = "")

We should unify the Empty message for both types of serialization, Protobuf and Avro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants