2014-07-18 5 views
0

4 개의 데이터 노드가있는 mysql 클러스터가 있습니다. 트랜잭션을 작게 유지하기 위해 50,000 개의 청크로 된로드 데이터 infile을 사용하여 8 백만 행의 삽입을 시도합니다. 시계 작업과 마찬가지로 테이블에 100 만 개의 행이 삽입 된 후 인서트가 거의 20 분 동안 정지 한 후 다시 시작됩니다. 또한 로그에서이 오류가 발생합니다.MySQL 클러스터 삽입 노점 TCROLLBACKREQ

2014년 7월 17일 22시 34분 59초 [NdbApi] ERROR - 나쁜 플래그 TCROLLBACKREQ 보내기 내가 있으리라 믿고있어

내가 내 변경 구성을 변경

[ndbd default] 
# Options affecting ndbd processes on all data nodes: 
NoOfReplicas=2 # Number of replicas 
DataMemory=90G # How much memory to allocate for data storage 
IndexMemory=10G # How much memory to allocate for index storage 
        # For DataMemory and IndexMemory, we have used the 
        # default values. Since the "world" database takes up 
        # only about 500KB, this should be more than enough for 
        # this example Cluster setup. 
NoOfFragmentLogFiles=20 
MaxNoOfOrderedIndexes=1000 
MaxNoOfAttributes=10000 
MaxBufferedEpochs=10000 
MaxNoOfConcurrentTransactions=1000000 
MaxNoOfConcurrentOperations=10000000 
MaxNoOfLocalOperations=11000000 

[tcp default] 
# TCP/IP options: 
#portnumber=2202 # This the default; however, you can use any 
        # port that is free for all the hosts in the cluster 
        # Note: It is recommended that you do not specify the port 
        # number at all and simply allow the default value to be used 
        # instead 

[ndb_mgmd] 
# Management process options: 
hostname=########.173   # Hostname or IP address of MGM node 
datadir=/var/lib/mysql-cluster # Directory for MGM node log files 
nodeId=1 

[ndbd] 
# Options for data node "A": 
hostname=########.173   # Hostname or IP address 
datadir=/usr/local/mysql/data # Directory for this data node's data files 
ServerPort=50501 
nodeId=2 
MaxNoOfExecutionThreads=4 

[ndbd] 
# Options for data node "B": 
hostname=########.174   # Hostname or IP address 
datadir=/usr/local/mysql/data # Directory for this data node's data files 
ServerPort=50502 
nodeId=3 
MaxNoOfExecutionThreads=4 

[ndbd] 
# Options for data node "C": 
hostname=########.175   # Hostname or IP address 
datadir=/usr/local/mysql/data # Directory for this data node's data files 
ServerPort=50503 
nodeId=5 
MaxNoOfExecutionThreads=4 

[ndbd] 
# Options for data node "D": 
hostname=########.176   # Hostname or IP address 
datadir=/usr/local/mysql/data # Directory for this data node's data files 
ServerPort=50504 
nodeId=6 
MaxNoOfExecutionThreads=4 

#[ndbd] 
# Options for data node "E": 
#hostname=########.177   # Hostname or IP address 
#datadir=/usr/local/mysql/data # Directory for this data node's data files 
#ServerPort=50505 
#nodeId=7 
#MaxNoOfExecutionThreads=4 

[mysqld] 
# SQL node options: 
nodeId=4 
hostname=########.174   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=7 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=8 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=9 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=10 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=11 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=12 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=13 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

[mysqld] 
# SQL node options: 
nodeId=14 
hostname=########.177   # Hostname or IP address 
           # (additional mysqld connections can be 
           # specified for this node for various 
           # purposes such as running ndb_restore) 

답변

0

필요 해요 구성이 문제를 해결했습니다.

[TCP DEFAULT] 
SendBufferMemory=8M 
ReceiveBufferMemory=8M 

[NDB_MGMD DEFAULT] 
PortNumber=1186 
Datadir=/data/mysqlcluster/ 

[NDB_MGMD] 
NodeId=1 
Hostname=vacnode6.mc.vanderbilt.edu 
LogDestination=FILE:filename=ndb_1_cluster.log,maxsize=10000000,maxfiles=6 
ArbitrationRank=1 

[NDBD DEFAULT] 
NoOfReplicas=2 
ServerPort=2200 
Datadir=/data/mysqlcluster/ 
FileSystemPathDD=/data/mysqlcluster/ 
BackupDataDir=/data/mysqlcluster//backup/ 
#FileSystemPathUndoFiles=/data/mysqlcluster/ 
#FileSystemPathDataFiles=/data/mysqlcluster/ 
DataMemory=95695M 
IndexMemory=11962M 
LockPagesInMainMemory=1 

MaxNoOfConcurrentOperations=100000 
MaxNoOfConcurrentTransactions=16384 

StringMemory=25 
MaxNoOfTables=4096 
MaxNoOfOrderedIndexes=2048 
MaxNoOfUniqueHashIndexes=512 
MaxNoOfAttributes=24576 
MaxNoOfTriggers=14336 

### Params for REDO LOG 
FragmentLogFileSize=256M 
InitFragmentLogFiles=SPARSE 
NoOfFragmentLogFiles=374 
RedoBuffer=64M 

TransactionBufferMemory=8M 

TimeBetweenGlobalCheckpoints=1000 
TimeBetweenEpochs=100 

TimeBetweenEpochsTimeout=0 

### Params for LCP 
DiskCheckpointSpeedInRestart=100M 
DiskCheckpointSpeed=10M 
TimeBetweenLocalCheckpoints=20 

### Heartbeating 
HeartbeatIntervalDbDb=15000 
HeartbeatIntervalDbApi=15000 

### Params for setting logging 
MemReportFrequency=30 
BackupReportFrequency=10 
LogLevelStartup=15 
LogLevelShutdown=15 
LogLevelCheckpoint=8 
LogLevelNodeRestart=15 

### Params for BACKUP 
BackupMaxWriteSize=1M 
BackupDataBufferSize=24M 
BackupLogBufferSize=16M 
BackupMemory=40M 

### Params for ODIRECT 
#Reports indicates that odirect=1 can cause io errors (os err code 5) on some systems. You must test. 
#ODirect=1 

### Watchdog 
TimeBetweenWatchdogCheckInitial=60000 

### TransactionInactiveTimeout - should be enabled in Production 
TransactionInactiveTimeout=60000 
### New 7.1.10 redo logging parameters 
RedoOverCommitCounter=3 
RedoOverCommitLimit=20 
### REALTIME EXTENSIONS 
#RealTimeScheduler=1 
### REALTIME EXTENSIONS FOR 6.3 ONLY 
#SchedulerExecutionTimer=80 
#SchedulerSpinTimer=40 

### DISK DATA 
SharedGlobalMemory=20M 
DiskPageBufferMemory=64M 

### Multithreading 
MaxNoOfExecutionThreads=8 
NoOfFragmentLogParts=4 

### Increasing the LongMessageBuffer b/c of a bug (20090903) 
LongMessageBuffer=32M 

BatchSizePerLocalScan=512 
[NDBD] 
NodeId=2 
Hostname=vacnode1.mc.vanderbilt.edu 

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime 
#LockExecuteThreadToCPU=X 
#LockMaintThreadsToCPU=Y 

[NDBD] 
NodeId=3 
Hostname=vacnode2.mc.vanderbilt.edu 

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime 
#LockExecuteThreadToCPU=X 
#LockMaintThreadsToCPU=Y 

[NDBD] 
NodeId=4 
Hostname=vacnode3.mc.vanderbilt.edu 

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime 
#LockExecuteThreadToCPU=X 
#LockMaintThreadsToCPU=Y 

[NDBD] 
NodeId=5 
Hostname=vacnode4.mc.vanderbilt.edu 

### REALTIME ASPECTS - THREAD BINDING 
### READ http://johanandersson.blogspot.com/2008/02/mysql-cluster-features-what-they-are.html#realtime 
#LockExecuteThreadToCPU=X 
#LockMaintThreadsToCPU=Y 

[MYSQLD DEFAULT] 
DefaultOperationRedoProblemAction=QUEUE 
BatchSize=512 
#BatchByteSize=2048K 
#MaxScanBatchSize=2048K 

[MYSQLD] 
NodeId=6 
[MYSQLD] 
NodeId=7 
[MYSQLD] 
NodeId=8 
[MYSQLD] 
NodeId=9 

[MYSQLD] 
NodeId=10 
[MYSQLD] 
NodeId=11 
[MYSQLD] 
NodeId=12 
[MYSQLD] 
NodeId=13 

[MYSQLD] 
NodeId=14 
[MYSQLD] 
NodeId=15 
[MYSQLD] 
NodeId=16 
[MYSQLD] 
NodeId=17 

[MYSQLD] 
NodeId=18 
[MYSQLD] 
NodeId=19 
[MYSQLD] 
NodeId=20 
[MYSQLD] 
NodeId=21 

[MYSQLD] 
NodeId=22 
[MYSQLD] 
NodeId=23 
[MYSQLD] 
NodeId=24 
[MYSQLD] 
NodeId=25 

[MYSQLD] 
NodeId=26 
[MYSQLD] 
NodeId=27 
[MYSQLD] 
NodeId=28 
[MYSQLD] 
NodeId=29 

[MYSQLD] 
NodeId=30 
[MYSQLD] 
NodeId=31 
[MYSQLD] 
NodeId=32 
[MYSQLD] 
NodeId=33 

[MYSQLD] 
NodeId=34 
[MYSQLD] 
NodeId=35 
[MYSQLD] 
NodeId=36 
[MYSQLD] 
NodeId=37 

[MYSQLD] 
[MYSQLD] 
[MYSQLD] 
[MYSQLD] 
### SLOTS (one for each ndb_mgmd) FOR HELPER APPLICATIONS SUCH AS ndb_show_tables etc 
[MYSQLD] 
Hostname=vacnode6.mc.vanderbilt.edu 
### SLOT FOR CMON 
[MYSQLD] 
Hostname=something.mc.vanderbilt.edu