Add a max length field to QUEUE_SNAPSHOT, to avoid race conditions.