presto-main/src/main/java/io/prestosql/execution/resourcegroups/InternalResourceGroup.java/InternalResourceGroup/setSchedulingWeight
class InternalResourceGroup:    @Override
    public void setSchedulingWeight(int weight)
    {
        checkArgument(weight > 0, "weight must be positive");
        synchronized (root) {
            this.schedulingWeight = weight;
            if (parent.isPresent() && parent.get().schedulingPolicy == WEIGHTED && parent.get().eligibleSubGroups.contains(this)) {
                parent.get().addOrUpdateSubGroup(this);
            }
        }
    }