package mirror;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class Queues {

  // this is probably too large, but hopefully it will avoid inotify overflow exceptions
  public final BlockingQueue<Update> incomingQueue = new ArrayBlockingQueue<>(1_000_000);
  public final BlockingQueue<Update> saveToLocal = new ArrayBlockingQueue<>(1_000);
  public final BlockingQueue<Update> saveToRemote = new ArrayBlockingQueue<>(1_000);

}

@@ -38,21 +38,16 @@
 current.
-Array
 Blocking
@@ -73,32 +73,38 @@
 util.concurrent.
+Linked
 BlockingQueue;%0A%0A
@@ -264,37 +264,38 @@
 mingQueue = new 
-Array
+Linked
 BlockingQueue%3C%3E(
@@ -302,24 +302,340 @@
 1_000_000);%0A
+  // These need to be large enough so that when the SyncLogic thread is outputting the%0A  // results of a diff, and there are ~10k/100k new files to send, that it can completely%0A  // offload those Updates to the saveToRemote queue, so that it can unblock, and start%0A  // accepting new Updates from the incomingQueue.%0A
   public fin
@@ -673,29 +673,30 @@
 Local = new 
-Array
+Linked
 BlockingQueu
@@ -700,24 +700,28 @@
 ueue%3C%3E(1_000
+_000
 );%0A  public 
@@ -771,13 +771,14 @@
 new 
-Array
+Linked
 Bloc
@@ -794,14 +794,18 @@
 %3C%3E(1_000
+_000
 );%0A%0A%7D%0A

Fix sends blocking due to small queue size.