diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java b/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java index 009a6781b6..220842cf22 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java @@ -81,10 +81,10 @@ public final class BatchControl { */ private int bufferMax; - private final Queue[] queues = new Queue[3]; + private final Queue[] queues = new Queue[2]; - static final int DELETE_QUEUE = 1; - static final int INSERT_QUEUE = 2; + static final int DELETE_QUEUE = 0; + static final int INSERT_QUEUE = 1; /** * Create for a given transaction, PersistExecute, default size and getGeneratedKeys. @@ -268,7 +268,6 @@ public void clear() { } private void flushBuffer(boolean reset) throws BatchedSqlException { - flushQueue(queues[0]); flushInternal(reset); flushQueue(queues[DELETE_QUEUE]); flushQueue(queues[INSERT_QUEUE]);