diff --git a/core/docker/Dockerfile b/core/docker/Dockerfile index f9c1343b1454..777e8c012357 100644 --- a/core/docker/Dockerfile +++ b/core/docker/Dockerfile @@ -34,8 +34,8 @@ RUN \ mkdir -p /tmp/overlay/usr/libexec/ && \ touch /tmp/overlay/usr/libexec/grepconf.sh && \ chmod +x /tmp/overlay/usr/libexec/grepconf.sh && \ - yum update -y && \ - yum install --installroot /tmp/overlay --setopt install_weak_deps=false --nodocs -y \ + dnf update -y && \ + dnf install --installroot /tmp/overlay --setopt install_weak_deps=false --nodocs -y \ less \ libstdc++ `# required by snappy and duckdb` \ curl-minimal grep `# required by health-check` \ diff --git a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java index 9de719bbfeab..089024cb9aff 100644 --- a/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java +++ b/core/trino-main/src/main/java/io/trino/execution/resourcegroups/InternalResourceGroup.java @@ -136,7 +136,7 @@ public class InternalResourceGroup @GuardedBy("root") private ResourceUsage cachedResourceUsage = new ResourceUsage(0, 0, 0); @GuardedBy("root") - private long lastStartMillis; + private long lastStartNanos; private final CounterStat timeBetweenStartsSec = new CounterStat(); private final CounterStat startedQueries = new CounterStat(); @@ -776,7 +776,7 @@ private void updateEligibility() } else { parent.get().eligibleSubGroups.remove(this); - lastStartMillis = 0; + lastStartNanos = 0; } parent.get().updateEligibility(); } @@ -970,11 +970,11 @@ private boolean internalStartNext() boolean started = subGroup.internalStartNext(); checkState(started, "Eligible sub group had no queries to run"); - long currentTime = System.currentTimeMillis(); - if (lastStartMillis != 0) { - timeBetweenStartsSec.update(Math.max(0, (currentTime - lastStartMillis) / 1000)); + long currentTime = System.nanoTime(); + if (lastStartNanos != 0) { + timeBetweenStartsSec.update(Math.max(0, (currentTime - lastStartNanos) / 1_000_000)); } - lastStartMillis = currentTime; + lastStartNanos = currentTime; descendantQueuedQueries--; // Don't call updateEligibility here, as we're in a recursive call, and don't want to repeatedly update our ancestors.