mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
perf(sqs): copy the queue once when messages expire or move to a dead-letter queue (#7493)
This commit is contained in:
1 parent
efe6cbc78a
commit
f53ba4a4a2
1 file changed
+3
@@ -115,6 +115,9 @@ final class MessageList extends AbstractList<Message> implements RandomAccess {
|
||||
kept[count++] = message;
|
||||
}
|
||||
}
|
||||
if (count == kept.length) {
|
||||
return new MessageList(new Slots(kept, count), count);
|
||||
}
|
||||
Message[] items = new Message[count];
|
||||
System.arraycopy(kept, 0, items, 0, count);
|
||||
return new MessageList(new Slots(items, count), count);
|
||||
|
||||
Reference in new issue
Block a user