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 2020/04/30 02:35:02 UTC
[GitHub] [shardingsphere] henrypoter opened a new issue #5390: sharding-scaling nullpoint
henrypoter opened a new issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390
## Bug Report
### Which version of ShardingSphere did you use?
4.1.0
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
sharding-scaling
### Expected behavior
### Actual behavior
I use sharding-scaling and sharding-proxy to move data from old cluster to the new cluster.
Below exception occured:
`[ERROR] 09:53:53.645 [pool-1-thread-21] o.a.s.s.c.e.e.SyncTaskExecuteCallback - RealtimeDataSyncTask realtime-hc_hiwork_suite_new execute exception exit
java.lang.NullPointerException: null
at org.apache.shardingsphere.shardingscaling.mysql.MySQLBinlogReader.handleUpdateRowsEvent(MySQLBinlogReader.java:137)
at org.apache.shardingsphere.shardingscaling.mysql.MySQLBinlogReader.read(MySQLBinlogReader.java:97)
at org.apache.shardingsphere.shardingscaling.mysql.MySQLBinlogReader.run(MySQLBinlogReader.java:75)
`
the following code caused a nullpointexception:
`!oldValue.equals(newValue)`
The reason is that there is a field, it's oldValue is null.
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Use scaling to sync database, and update a row which has null value.
### Example codes for reproduce this issue (such as a github link).
The correct logic :
`boolean updated = false;
if(null == oldValue){
updated = null != newValue;
}else{
updated = !oldValue.equals(newValue);
}`
----------------------------------------------------------------
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
[GitHub] [shardingsphere] terrymanu closed issue #5390: sharding-scaling nullpoint
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390
----------------------------------------------------------------
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
[GitHub] [shardingsphere] Lucas-307 commented on issue #5390: sharding-scaling nullpoint
Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390#issuecomment-625576005
Let me try.
----------------------------------------------------------------
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
[GitHub] [shardingsphere] Lucas-307 commented on issue #5390: sharding-scaling nullpoint
Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390#issuecomment-629166247
@avalon5666 Yes, I have fixed it in local, I will push it in time.
----------------------------------------------------------------
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
[GitHub] [shardingsphere] kimmking commented on issue #5390: sharding-scaling nullpoint
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390#issuecomment-621608379
can you fix it as a pr?
----------------------------------------------------------------
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
[GitHub] [shardingsphere] avalon5666 commented on issue #5390: sharding-scaling nullpoint
Posted by GitBox <gi...@apache.org>.
avalon5666 commented on issue #5390:
URL: https://github.com/apache/shardingsphere/issues/5390#issuecomment-628669143
@Lucas-307 Do you have time to finish 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