You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/21 08:51:42 UTC
[GitHub] [shardingsphere] win-ho opened a new issue, #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
win-ho opened a new issue, #19427:
URL: https://github.com/apache/shardingsphere/issues/19427
![image](https://user-images.githubusercontent.com/53374863/180171347-597058c6-3b49-4b71-8cca-19cddc1fc23d.png)
As it shows, I have configured the logic table `student` with 3 physic tables: `student_0`, `student_1` and `student_2`.
But it does not work when inserting data into `student_2`. And it reminds me that `student_2` does not exist.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191272643
>
Thanks for your advice
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] 0xkevin commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
0xkevin commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191261649
<img width="1610" alt="image" src="https://user-images.githubusercontent.com/30562553/180180830-e1208271-087f-4dd3-855a-aa437e62232e.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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191242695
> Can you provide a demo to reproduce this bug?
Sure. Is it zip package ok ?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191261647
> I just found a directory which named `.shardingsphere` in my project directory. it worked normally after I delete this directory!
This is a cluster mode, it will store config file to `.shardingsphere` directory.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] 0xkevin commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
0xkevin commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191260317
>
Thanks for your reminder, it's work for me when I deleted `shardingsphere-rw` directory from zookeeper.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191249337
@win-ho Ok, you can push demo to your github repository, and paste link here.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191236632
Can you provide a demo to reproduce this bug?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191273343
> > I truely config the physical table table_0 and table_1 (test-db.student_Missing superscript or subscript argument
> >
> > $->{0..1}) in first time! but I did not notice that a directory was generated in my project. And then I config phsical tables (test-db.student_$->{0..2}), and rerun my project, error which I just issued just occured.
>
> Maybe you can set `overwrite: true`.
Thanks for your advice
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho closed issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho closed issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
URL: https://github.com/apache/shardingsphere/issues/19427
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] 0xkevin commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
0xkevin commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191249401
spring:
shardingsphere:
props:
sql-show: true
datasource:
names: ds1,ds2
ds1:
driver-class-name: com.mysql.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
jdbc-url: jdbc:mysql://123.60.18.135:30191/course_db?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
username: course
password: course123
ds2:
driver-class-name: com.mysql.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
jdbc-url: jdbc:mysql://123.60.18.135:30689/course_db?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
username: course
password: course123
mode:
overwrite: false
type: Cluster
repository:
type: ZooKeeper
props:
namespace: shardingsphere-rw
retryIntervalMilliseconds: 500
server-lists: zoo1:2181,zoo2:2182,zoo3:2183
timeToLiveSeconds: 60
rules:
readwrite-splitting:
data-sources:
ds:
type: Static
load-balancer-name: my_lb
props:
write-data-source-name: ds1
read-data-source-names: ds2
load-balancers:
my_lb:
type: ROUND_ROBIN
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
hl-course-inline:
type: INLINE
props:
algorithm-expression: hl_course_$->{cid % 2 + 1}
tables:
hl_course:
actual-data-nodes: ds.hl_course_$->{1..2}
key-generate-strategy:
column: cid
key-generator-name: snowflake
table-strategy:
standard:
sharding-algorithm-name: hl-course-inline
sharding-column: cid
#----------------------log---------------------------
logging:
level:
org.apache.shardingsphere: debug
#----------------------mybatisplus---------------------------
mybatis-plus:
print-sql: true
configuration:
cache-enabled: false
map-underscore-to-camel-case: true
use-generated-keys: true
default-statement-timeout: 600
global-config:
banner: false
db-config:
table-prefix: hl_
`<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.atguigu</groupId>
<artifactId>shardingjdbcdemo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>shardingjdbcdemo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
`
<img width="1100" alt="image" src="https://user-images.githubusercontent.com/30562553/180177830-acfa5614-6a74-451e-9e6a-5fbc77d21e2e.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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] 0xkevin commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
0xkevin commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191234981
> it works normally with the same configurations at version 5.1.1
me too
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191225712
it works normally with the same configurations at version 5.1.1
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191263443
>
> @win-ho So, can you close this issue now?
OK
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191252496
I find that,maybe it's not a bug! but still, it got some confusing problems.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191262997
@win-ho So, can you close this issue now?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191259322
![image](https://user-images.githubusercontent.com/53374863/180179435-db4e0227-813c-4155-b21e-b2fcb91a3b0e.png)
I truely config the physical table `table_0` and `table_1` (test-db.student_$->{0..1}) in first time! but I did not notice that a directory was generated in my project. And then I config phsical tables (`test-db.student_$->{0..2}`), and rerun my project, error which I just issued just occured.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191271383
> I truely config the physical table table_0 and table_1 (test-db.student_$->{0..1}) in first time! but I did not notice that a directory was generated in my project. And then I config phsical tables (test-db.student_$->{0..2}), and rerun my project, error which I just issued just occured.
Maybe you can set `overwrite: true`.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191268212
> > I just found a directory which named `.shardingsphere` in my project directory. it worked normally after I delete this directory!
>
> This is a cluster mode, it will store config file to `.shardingsphere` directory.
But still, I want to know that why it worked abnormally in 5.1.2, but not in 5.1.1 without deleting `.shardingsphere` ?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] win-ho commented on issue #19427: A bug in setting actual-data-nodes with shardingsphere-jdbc-core-spring-boot-starter at version 5.1.2
Posted by GitBox <gi...@apache.org>.
win-ho commented on issue #19427:
URL: https://github.com/apache/shardingsphere/issues/19427#issuecomment-1191254067
I just found a directory which named `.shardingsphere` in my project directory. it worked normally after I delete this directory!
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org