Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load data local infile将数据导入到dble后,不会释放占用的内存 #3427

Closed
24pawa opened this issue Oct 9, 2022 · 2 comments
Closed
Assignees
Labels
bug community issue from community
Milestone

Comments

@24pawa
Copy link

24pawa commented Oct 9, 2022

dble version:5.7.11-dble-3.21.10.0-97a3b6d73a49cb374020f930c59f82746220b424-20211119065525
preconditions :发现问题的环境是前端一台dble, 后端2台Mariadb 10.2.33数据库服务器

  • configs:

cluster.cnf

clusterEnable=false
clusterMode=zk
clusterIP=*.*.*.*:2181
clusterPort=5700
rootPath=/dble
clusterId=cluster-1
needSyncHa=false
showBinlogStatusTimeout=60000
sequenceHandlerType=1

bootstrap.cnf

-agentlib:jdwp=transport=dt_socket,server=y,address=8088,suspend=n
-server
-XX:+AggressiveOpts
-Dfile.encoding=UTF-8
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1984
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.host=127.0.0.1
-Xmx3G
-Xms1G
-Xss256k
-XX:MaxDirectMemorySize=3G
-XX:MetaspaceSize=100M
-XX:-OmitStackTraceInFastThrow
-XX:+PrintHeapAtGC
-XX:+PrintGCDateStamps
-Xloggc:./logs/gc_%WRAPPER_TIME_YYYYMMDDHHIISS%_%p.log
-XX:+PrintGCTimeStamps
-XX:+PrintGCDetails
-XX:+PrintTenuringDistribution
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:CMSFullGCsBeforeCompaction=0
-XX:+CMSClassUnloadingEnabled
-XX:LargePageSizeInBytes=128M
-XX:+UseFastAccessorMethods
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-DhomePath=.
-DinstanceName=dble01
-DinstanceId=1
-DserverId=xxx1
-DfakeMySQLVersion=5.7.11
-DserverBacklog=2048
-DuseOuterHa=true
-Dcharset=utf8mb4
-DmaxPacketSize=167772160
-DtxIsolation=2
-DidleTimeout=3600000
-DcapClientFoundRows=false
-DusingAIO=0
-DuseThreadUsageStat=1
-DcheckTableConsistency=0
-DcheckTableConsistencyPeriod=60000
-DprocessorCheckPeriod=1000
-DsqlExecuteTimeout=3600
-DotherMemSize=4
-DorderMemSize=4
-DjoinMemSize=4
-DbufferPoolChunkSize=32767
-DbufferPoolPageSize=4194304
-DuseSqlStat=1
-DclearBigSQLResultSetMapMs=600000
-DrecordTxn=0
-DxaSessionCheckPeriod=1000
-DxaLogCleanPeriod=1000
-DnestLoopConnSize=4
-DnestLoopRowsSize=2000
-DenableSlowLog=1
-DslowLogBaseDir=./slowlogs
-DslowLogBaseName=slow-query
-DflushSlowLogPeriod=1
-DflushSlowLogSize=1000
-DsqlSlowTime=500
-DmaxRowSizeToFile=100000
-DenableBatchLoadData=1
-DenableFlowControl=false
-DflowControlHighLevel=4194304
-DflowControlLowLevel=262144
-DenableGeneralLog=0

db.xml



user.xml



sharding.xml

<dble:sharding xmlns:dble="http://dble.cloud/" version="4.0">
    <schema name="csgodb" shardingNode="dn01_1">
        <shardingTable name="user_login_log" shardingNode="dn01_$1-4,dn02_$1-4" function="func_jumpHash_int8" shardingColumn="user_id"/>
    </schema>
    <shardingNode name="dn01_$1-4" dbGroup="dbGroup1" database="csgodb_$1-4"/>
    
    <function name="func_jumpHash_int8" class="jumpStringHash">
        <property name="partitionCount">8</property>
        <property name="hashSlice">0:0</property>
    </function>
</dble:sharding>
  • steps:
    1. 重启dble,内存占用2G
    2. 将user_login_log的数据文件(1G)在dble管理账号下用load data local infile命令导入数据库
    3. 查看导入完成后的内存为3G
  • expect result:
    1. 内存在导入完成后过段时间能恢复到2G
  • real result:
    1. 内存一直未恢复,如果后续还有新的导入操作,内存占用会一直累加,直到在某次导入的文件大小大于可用内存时会导致导入报错
  • supplements:
@PanternBao PanternBao added community issue from community bug labels Oct 9, 2022
@ylinzhu ylinzhu self-assigned this Oct 19, 2022
@ylinzhu
Copy link
Member

ylinzhu commented Oct 19, 2022

will be fixed in the next release and in the problematic release

@wjl1619 wjl1619 added this to the 3.22.11.0 milestone Oct 24, 2022
@ylinzhu ylinzhu assigned wjl1619 and unassigned ylinzhu Oct 24, 2022
@wjl1619
Copy link
Member

wjl1619 commented Dec 13, 2022

verified on version: 5.7.21-dble-9.9.9.9-f40048915be091cfaa391dd429523ee17d0d4cb3-20221212012550

@wjl1619 wjl1619 closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community issue from community
Projects
None yet
Development

No branches or pull requests

4 participants