Commit 0ad10d7f authored by wanglianghe's avatar wanglianghe

单批次数量减少,增大连接超时时间

parent fe7c746e
...@@ -134,7 +134,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -134,7 +134,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
private static final String PREFIX = "price_batch_update_"; private static final String PREFIX = "price_batch_update_";
private static final Integer DATA_THRESHOLD = 50; private static final Integer DATA_THRESHOLD = 30;
private static final String BATCH_DEL_SCRIPT = "for k,v in pairs(ARGV) do \n " + private static final String BATCH_DEL_SCRIPT = "for k,v in pairs(ARGV) do \n " +
"redis.call('del',string.gsub(v,'\"',''),'') \n" + "redis.call('del',string.gsub(v,'\"',''),'') \n" +
......
...@@ -46,13 +46,13 @@ spring: ...@@ -46,13 +46,13 @@ spring:
datasource: datasource:
master: master:
name: jiedao name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: mysql@2024 password: mysql@2024
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改 slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
name: jiedao name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE&connectTimeout=60000
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: mysql@2024 password: mysql@2024
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment