From 406ac3f82ea16f38efad946e27f47ef4543f7a43 Mon Sep 17 00:00:00 2001 From: Elijah Date: Wed, 22 Feb 2023 18:40:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?KERNEL-14292=20fix:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=A2=86=E5=9F=9F=E6=A8=A1=E5=9D=97=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apm/toolkit/trace/TraceDomain.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java diff --git a/fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java b/fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java new file mode 100644 index 000000000..76ba22f8a --- /dev/null +++ b/fine-skywalking-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceDomain.java @@ -0,0 +1,28 @@ +package org.apache.skywalking.apm.toolkit.trace; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 用于标记模块或者领域, 配合{@link Trace}使用 + * + * 若类和方法上同时定义,方法上的优先 + * + * 若{@link Trace#operationName()}为空, 最终生成的span名为: + * 领域名/简单类名#简单方法名。 + * 否则为: + * 领域名/operationName + * + * @author Elijah + * created on 2023-02-22 + */ +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface TraceDomain { + + //领域名 + String value() default ""; + +} From aecfb8004bfacb7d9a5afbcb57c4000ee9ef9c79 Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Fri, 24 Feb 2023 14:23:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-90408=E3=80=90=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=80=91=E8=BF=81=E7=A7=BB=E3=80=81=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=95=B0=E6=8D=AE=E5=BA=93=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InformationExtractorJdbcDatabaseMetaDataImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java b/fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java index 13c03a1ef..8a87089a2 100644 --- a/fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java +++ b/fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/extract/internal/InformationExtractorJdbcDatabaseMetaDataImpl.java @@ -650,11 +650,15 @@ public class InformationExtractorJdbcDatabaseMetaDataImpl implements Information final int columnPosition = resultSet.getInt( "KEY_SEQ" ); + final int index = columnPosition - 1; + // Fill up the array list with nulls up to the desired index, because some JDBC drivers don't return results ordered by column position + while ( pkColumns.size() <= index ) { + pkColumns.add( null ); + } final Identifier columnIdentifier = DatabaseIdentifier.toIdentifier( resultSet.getString( "COLUMN_NAME" ) ); - final ColumnInformation column = tableInformation.getColumn( columnIdentifier ); - pkColumns.add( columnPosition-1, column ); + pkColumns.set( index, tableInformation.getColumn( columnIdentifier ) ); } } finally {