This issue is related to #71. When uploading urls using e.g. the command java -jar target/urlfrontier-client-2.4-SNAPSHOT.jar PutURLs -f <some_path>/2000urls, the server throws a row of IllegalStateExceptions.
Analogously to #71, I managed to fix it by putting the code line unacked.incrementAndGet(); (class DistributedFrontierService line 512) right in front of the execute call of the writeExecutorService (line 510).
Exception in thread "pool-2-thread-1" java.lang.IllegalStateException: Stream is already completed, no further calls are allowed
at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:375)
at crawlercommons.urlfrontier.service.SynchronizedStreamObserver.onNext(SynchronizedStreamObserver.java:59)
at crawlercommons.urlfrontier.service.cluster.DistributedFrontierService$6.lambda$onNext$0(DistributedFrontierService.java:524)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "pool-2-thread-2" java.lang.IllegalStateException: Stream is already completed, no further calls are allowed
at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:375)
at crawlercommons.urlfrontier.service.SynchronizedStreamObserver.onNext(SynchronizedStreamObserver.java:59)
at crawlercommons.urlfrontier.service.cluster.DistributedFrontierService$6.lambda$onNext$0(DistributedFrontierService.java:524)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "pool-2-thread-3" java.lang.IllegalStateException: Stream is already completed, no further calls are allowed
at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:375)
at crawlercommons.urlfrontier.service.SynchronizedStreamObserver.onNext(SynchronizedStreamObserver.java:59)
at crawlercommons.urlfrontier.service.cluster.DistributedFrontierService$6.lambda$onNext$0(DistributedFrontierService.java:524)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "pool-2-thread-4" java.lang.IllegalStateException: Stream is already completed, no further calls are allowed
at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:375)
at crawlercommons.urlfrontier.service.SynchronizedStreamObserver.onNext(SynchronizedStreamObserver.java:59)
at crawlercommons.urlfrontier.service.cluster.DistributedFrontierService$6.lambda$onNext$0(DistributedFrontierService.java:524)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
This issue is related to #71. When uploading urls using e.g. the command
java -jar target/urlfrontier-client-2.4-SNAPSHOT.jar PutURLs -f <some_path>/2000urls
, the server throws a row of IllegalStateExceptions. Analogously to #71, I managed to fix it by putting the code lineunacked.incrementAndGet();
(class DistributedFrontierService line 512) right in front of theexecute
call of thewriteExecutorService
(line 510).