This is an automated email from the ASF dual-hosted git repository. mblow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 3f919812361da62852cf6d280d7b9a2a3d7aeaa5 Author: Ian Maxon <[email protected]> AuthorDate: Fri Oct 24 22:26:42 2025 -0700 [ASTERIXDB-3658][RT]Remove operator descriptions from profile - user model changes: yes - storage format changes: no - interface changes: no Details: Replace operator descriptions with UUIDs to avoid extremely large name fields for certain queries. Ext-ref: MB-68975 Change-Id: If165897ba45cc685cd85258c1167a7252996236f Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20524 Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Ian Maxon <[email protected]> Reviewed-by: Ali Alsuliman <[email protected]> Contrib: Ian Maxon <[email protected]> --- .../src/test/resources/runtimets/profiled.xml | 17 +++++++++++++ .../long-description.1.query.sqlpp | 29 ++++++++++++++++++++++ .../long-description/long-description.1.adm | 0 .../non-unary-subplan.3.regexjson | 2 +- .../meta/AlgebricksMetaOperatorDescriptor.java | 12 ++++----- .../api/dataflow/ProfiledOperatorNodePushable.java | 5 ++-- 6 files changed, 56 insertions(+), 9 deletions(-) diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/profiled.xml b/asterixdb/asterix-app/src/test/resources/runtimets/profiled.xml index d3664d4cc1..75fe49734b 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/profiled.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/profiled.xml @@ -50,5 +50,22 @@ <output-dir compare="Text">non-unary-subplan</output-dir> </compilation-unit> </test-case> + <test-case FilePath="profile"> + <compilation-unit name="long-description"> + <output-dir compare="Text">long-description</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="profile"> + <compilation-unit name="long-description"> + <parameter name="profile" value="counts" type="string"/> + <output-dir compare="Text">long-description</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="profile"> + <compilation-unit name="long-description"> + <parameter name="profile" value="timings" type="string"/> + <output-dir compare="Text">long-description</output-dir> + </compilation-unit> + </test-case> </test-group> </test-suite> \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/profile/long-description/long-description.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/profile/long-description/long-description.1.query.sqlpp new file mode 100644 index 0000000000..80a4b5d421 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/profile/long-description/long-description.1.query.sqlpp @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Test for extremely long select list overflowing profile description serialization limit + * Expected Res : Success + * Date : 28 Oct 2025 + */ +SELECT `xryd`.`sa` AS `sgby.ka`, `anuk`.`seihfmxzge` AS `htyt.savygxcmbs`, `jaez`.`xsieyf` AS `bvod.emzuyu`, `ofpc`.`bpqfcswbeNR` AS `dsfw.rvmcsmjqyFU`, `caaq`.`vbolgolazjiXwk` AS `blvu.ajclxwobljlPgk`, `bucv`.`xssf` AS `hxmt.bylg`, `txnm`.`aaeXmub` AS `ibsh.rvmRpvy`, `kbisf`.`dkahem` AS `tveyz.pghrnk`, `izyem`.`qgfRqgfqj` AS `kfgjr.cwkCuzgji`, `hftm`.`gcikpfNc` AS `whrv.hhqfyvBe`, `gqsq`.`ykrOaznrxrdqJiq` AS `vhxu.aktDynossbhxZfv`, `nzgd`.`amfwzmcvSehf` AS `zpce.ejxcyehkLfkl`, `qkvc`.`y [...] +FROM Metadata.`Dataset` AS a +WHERE a.`xqok`.`dyksdkpxhBs` BETWEEN "1970-01-01" AND "1972-12-30" +ORDER BY a.`pvuv`.`tj` +LIMIT 10; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/long-description/long-description.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/long-description/long-description.1.adm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/non-unary-subplan/non-unary-subplan.3.regexjson b/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/non-unary-subplan/non-unary-subplan.3.regexjson index e59f09565b..9d6b786e8c 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/non-unary-subplan/non-unary-subplan.3.regexjson +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/profile/non-unary-subplan/non-unary-subplan.3.regexjson @@ -30,7 +30,7 @@ "partition-send-profile": [], "counters": [ { - "name": "R{ANID:ODID:[0-9]:0\\.1 - MicroOp Subplan(?:.|\n)+}", + "name": "R{ANID:ODID:[0-9]:0\\.1 - MicroOp (?:.|\n)+}", "run-time": "R{[0-9.]+}", "runtime-id": "R{.+}", "cardinality-out": "R{[0-9.]+}", diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java index 2a3fa7ee19..9958e8ba3f 100644 --- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java +++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/meta/AlgebricksMetaOperatorDescriptor.java @@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.UUID; import org.apache.hyracks.algebricks.runtime.base.AlgebricksPipeline; import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory; @@ -120,9 +121,8 @@ public class AlgebricksMetaOperatorDescriptor extends AbstractSingleActivityOper return base + "." + id + (subPlan >= 0 ? "." + subPlan : "") + (subPos >= 0 ? "." + subPos : ""); } - private static IOperatorStats makeStatForRuntimeFact(IPushRuntimeFactory factory, String base, String baseId, - int pos, int subPlan, int subPos) { - return new OperatorStats(makeStatName(base, factory.toString(), pos, -1, subPlan, subPos), + private static IOperatorStats makeStatForRuntimeFact(String base, String baseId, int pos, int subPlan, int subPos) { + return new OperatorStats(makeStatName(base, UUID.randomUUID().toString(), pos, -1, subPlan, subPos), makeId(baseId, pos, subPlan, subPos)); } @@ -142,12 +142,12 @@ public class AlgebricksMetaOperatorDescriptor extends AbstractSingleActivityOper for (AlgebricksPipeline p : pipelines) { IPushRuntimeFactory[] subplanFactories = p.getRuntimeFactories(); for (int j = subplanFactories.length - 1; j > 0; j--) { - microOpStats.put(subplanFactories[j], makeStatForRuntimeFact(subplanFactories[j], baseName, - baseId, i, pipelines.indexOf(p), j)); + microOpStats.put(subplanFactories[j], + makeStatForRuntimeFact(baseName, baseId, i, pipelines.indexOf(p), j)); } } } - microOpStats.put(fact, makeStatForRuntimeFact(fact, baseName, baseId, i, -1, -1)); + microOpStats.put(fact, makeStatForRuntimeFact(baseName, baseId, i, -1, -1)); } for (SubplanRuntimeFactory sub : subplans) { sub.setStats(microOpStats); diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/ProfiledOperatorNodePushable.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/ProfiledOperatorNodePushable.java index 1984d8e07f..ae693d9b2a 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/ProfiledOperatorNodePushable.java +++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/dataflow/ProfiledOperatorNodePushable.java @@ -20,6 +20,7 @@ package org.apache.hyracks.api.dataflow; import java.util.HashMap; import java.util.Map; +import java.util.UUID; import org.apache.hyracks.api.com.job.profiling.counters.Counter; import org.apache.hyracks.api.comm.IFrameWriter; @@ -108,7 +109,7 @@ public class ProfiledOperatorNodePushable implements IOperatorNodePushable, ISta public static IOperatorNodePushable time(IOperatorNodePushable op, IHyracksTaskContext ctx, ActivityId acId) throws HyracksDataException { - String name = acId.toString() + " - " + op.getDisplayName(); + String name = acId.toString() + " - " + UUID.randomUUID(); IStatsCollector statsCollector = ctx.getStatsCollector(); IOperatorStats stats = new OperatorStats(name, acId.getOperatorDescriptorId().toString()); if (!(op instanceof ISelfProfilingNodePushable)) { @@ -128,7 +129,7 @@ public class ProfiledOperatorNodePushable implements IOperatorNodePushable, ISta public static void onlyAddStats(IOperatorNodePushable op, IHyracksTaskContext ctx, ActivityId acId) throws HyracksDataException { - String name = acId.toString() + " - " + op.getDisplayName(); + String name = acId.toString() + " - " + UUID.randomUUID(); IStatsCollector statsCollector = ctx.getStatsCollector(); IOperatorStats stats = new OperatorStats(name, acId.getOperatorDescriptorId().toString()); if (op instanceof IIntrospectingOperator) {
