You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/03/30 14:47:27 UTC

[GitHub] [skywalking] kezhenxu94 opened a new pull request #4593: [BugFix] Fix wrong H2 column type

kezhenxu94 opened a new pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593
 
 
   `MEDIUMTEXT` in H2 is CLOB in JDBC type, and casting it to `String` causes `ClassCastException`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on issue #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#issuecomment-606066069
 
 
   Fix CI please.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#issuecomment-606046094
 
 
   http://www.h2database.com/html/datatypes.html
   
   
   <img width="627" alt="image" src="https://user-images.githubusercontent.com/15965696/77926363-9f56f500-72d8-11ea-8fb8-c9e3acb61420.png">
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#discussion_r400255684
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TableInstaller.java
 ##########
 @@ -92,7 +92,7 @@ protected String getColumnType(ModelColumn column) {
         } else if (String.class.equals(type)) {
             return "VARCHAR(" + column.getLength() + ")";
         } else if (IntKeyLongValueHashMap.class.equals(type)) {
-            return "MEDIUMTEXT";
+            return "VARCHAR(20000)";
 
 Review comment:
   But e2e still passed? 
   
   Then you can't change this only. You need to override this method in the MySQL installer. Otherwise, the size of row could be over-length easily.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#discussion_r400267813
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TableInstaller.java
 ##########
 @@ -92,7 +92,7 @@ protected String getColumnType(ModelColumn column) {
         } else if (String.class.equals(type)) {
             return "VARCHAR(" + column.getLength() + ")";
         } else if (IntKeyLongValueHashMap.class.equals(type)) {
-            return "MEDIUMTEXT";
+            return "VARCHAR(20000)";
 
 Review comment:
   > But e2e still passed?
   
   https://github.com/apache/skywalking/issues/4594

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#issuecomment-606074511
 
 
   > Fix CI please.
   
   Fixed already

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 merged pull request #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#issuecomment-606045648
 
 
   And some trivial polishes, following up #4587 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#discussion_r400254005
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TableInstaller.java
 ##########
 @@ -92,7 +92,7 @@ protected String getColumnType(ModelColumn column) {
         } else if (String.class.equals(type)) {
             return "VARCHAR(" + column.getLength() + ")";
         } else if (IntKeyLongValueHashMap.class.equals(type)) {
-            return "MEDIUMTEXT";
+            return "VARCHAR(20000)";
 
 Review comment:
   > Why change this?
   
   <img width="669" alt="image" src="https://user-images.githubusercontent.com/15965696/77926626-e93fdb00-72d8-11ea-9b13-8b995672f956.png">
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [skywalking] wu-sheng commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4593: [BugFix] Fix wrong H2 column type
URL: https://github.com/apache/skywalking/pull/4593#discussion_r400252452
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2TableInstaller.java
 ##########
 @@ -92,7 +92,7 @@ protected String getColumnType(ModelColumn column) {
         } else if (String.class.equals(type)) {
             return "VARCHAR(" + column.getLength() + ")";
         } else if (IntKeyLongValueHashMap.class.equals(type)) {
-            return "MEDIUMTEXT";
+            return "VARCHAR(20000)";
 
 Review comment:
   Why change this?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services