presto-main/src/main/java/io/prestosql/execution/resourcegroups/StochasticPriorityQueue.java/Node/setTickets
class Node:        public void setTickets(long tickets)
        {
            checkArgument(tickets > 0, "tickets must be positive");
            if (tickets == this.tickets) {
                return;
            }
            long ticketDelta = tickets - this.tickets;
            Node<E> node = this;
            // Update total tickets in this node and all ancestors
            while (node != null) {
                node.totalTickets += ticketDelta;
                node = node.parent.orElse(null);
            }
            this.tickets = tickets;
        }