Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all 1560 articles
Browse latest View live

Relation between Redobuffer and SharedGlobalMemoryWhat is (no replies)

$
0
0
Hi,

I want to understand relation between SharedGlobalMemory and RedoBuffer.
Is it ok to set ,
RedoBuffer=512M
SharedGlobalMemory=128M

Or this will led to some config error or error when running sotring the data in mysql. For eg : redo logs overloaded.

Please suggest,

Thnaks,
Sohan

Connecting MySQL Cluster using ClusterJ (no replies)

$
0
0
Hi all,

I'm using 2 data nodes and 2 SQL nodes in MySQL Cluster.

Also i'm planning to connect MySQL Cluster via ClusterJ to achieve high performance.

Running the java command from one of my SQL Node. Facing the following error when trying to execute the java file.

java -classpath /usr/local/mysql/share/java/clusterj-api-7.3.5.jar:. -Djava.library.path=/usr/local/mysql/lib Main
Exception in thread "main" com.mysql.clusterj.ClusterJFatalUserException: No instance for service com.mysql.clusterj.SessionFactoryService could be found. Make sure that there is a file META-INF/services/com.mysql.clusterj.SessionFactoryService in your class path naming the factory class.
at com.mysql.clusterj.ClusterJHelper.getServiceInstance(ClusterJHelper.java:157)
at com.mysql.clusterj.ClusterJHelper.getSessionFactory(ClusterJHelper.java:67)
at com.mysql.clusterj.ClusterJHelper.getSessionFactory(ClusterJHelper.java:54)
at Main.main(Main.java:32)
[root@localhost MySQLCluster]#

Also i tried to use the jpa but i couldn't find the jar in my server. I have installed mysql-cluster 7.3 version.

Am i missing anything here.

Geographically Distributed Multi-Master MySQL Clusters (no replies)

$
0
0
Global data access can greatly expand the reach of your business. Continuent Tungsten multi-site multi-master (MSMM) solutions enable applications to accept write traffic in multiple locations across on-premises and cloud providers. This includes the following important real-world use cases:

- Improve performance for globally distributed users registering hardware devices by permitting updates on the geographically closest site.
- Ensure availability of credit card processing by spreading transaction processing across two or more sites. Users can still process credit card transactions if a single site is unavailable to them for any reason, including end-user Internet routing problems.
- Enable business continuity by using multi-master updates on different hosting providers for service scalability, personalization and software upgrades of GPS devices.

Individual Continuent Tungsten clusters already provide excellent single-site database availability and performance. In this webinar we will review the benefits of combining multiple Continuent Tungsten clusters into a global multi-site multi-master topology for:

- Optimizing your installation for MSMM
- Optimizing your application for MSMM
- Monitoring and administration
- Failover and recovery of individual servers or entire locations.

Join this live webinar on Thursday, 7/24. Register at https://www1.gotomeeting.com/register/601886553.

NDBCluster partitioning by non unique column (no replies)

$
0
0
Hi All,

I want to partition Call Detail Record (CDR) ttable using non unique column "Calling_party" in NDB cluster. i see only key can be used for partitioning. i have generated auto-increment ID column. is it possible to make composite key {ID,Calling_party} and partition by this composite key ... ?

Thank You,
Bibek

Disk storage blob using more memory than expected. (1 reply)

$
0
0
Hi All,

I'm evaluating Mysql Cluster, but having a problem using disk storage and blobs.

I have read the documentation that says the first 256 bytes of a blob will be held in DataMemory for disk based storage, but when I tried adding various sizes of blobs they started using different amounts of DataMemory.

To test I configured a very basic cluster, and used the following setup:

CREATE DATABASE test;
USE TEST;

DELIMITER //
CREATE PROCEDURE GenerateFakeData(in_records int, in_strlen int)
BEGIN
DECLARE i INT DEFAULT 1;
SET @var = lpad('', in_strlen, sha1(rand()));
WHILE i <= in_records DO
INSERT INTO testblob (id, data) VALUES (i, @var);
SET i = i + 1;
END WHILE;
END //
DELIMITER ;

CREATE LOGFILE GROUP lg_01
ADD UNDOFILE 'undofile.dat' ENGINE = NDB;

CREATE TABLESPACE ts_01
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg_01
INITIAL_SIZE = 4096M ENGINE = NDB;

CREATE TABLE `testblob` (
`id` int(11) NOT NULL,
`data` longblob NOT NULL STORAGE DISK,
PRIMARY KEY (`id`)
)
TABLESPACE ts_01 STORAGE DISK
ENGINE = NDB;


Now for the tests:

mysql> truncate table testblob;
Query OK, 0 rows affected (0.21 sec)

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+----------+------------+----------+-------------+
| node_id | memory_type | used | used_pages | total | total_pages |
+---------+---------------------+----------+------------+----------+-------------+
| 1 | Data memory | 12484608 | 381 | 83886080 | 2560 |
| 1 | Index memory | 688128 | 84 | 19136512 | 2336 |
| 1 | Long message buffer | 393216 | 1536 | 67108864 | 262144 |
| 2 | Data memory | 12451840 | 380 | 83886080 | 2560 |
| 2 | Index memory | 688128 | 84 | 19136512 | 2336 |
| 2 | Long message buffer | 393216 | 1536 | 67108864 | 262144 |
+---------+---------------------+----------+------------+----------+-------------+
6 rows in set (0.01 sec)

mysql> CALL GenerateFakeData(15000, 10240);
Query OK, 1 row affected (32.36 sec)

mysql> select count(id) from testblob;
+-----------+
| count(id) |
+-----------+
| 15000 |
+-----------+
1 row in set (0.01 sec)

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+----------+------------+----------+-------------+
| node_id | memory_type | used | used_pages | total | total_pages |
+---------+---------------------+----------+------------+----------+-------------+
| 1 | Data memory | 18186240 | 555 | 83886080 | 2560 |
| 1 | Index memory | 1130496 | 138 | 19136512 | 2336 |
| 1 | Long message buffer | 262144 | 1024 | 67108864 | 262144 |
| 2 | Data memory | 18186240 | 555 | 83886080 | 2560 |
| 2 | Index memory | 1130496 | 138 | 19136512 | 2336 |
| 2 | Long message buffer | 393216 | 1536 | 67108864 | 262144 |
+---------+---------------------+----------+------------+----------+-------------+
6 rows in set (0.01 sec)

mysql> truncate table testblob;
Query OK, 0 rows affected (0.18 sec)

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+----------+------------+----------+-------------+
| node_id | memory_type | used | used_pages | total | total_pages |
+---------+---------------------+----------+------------+----------+-------------+
| 1 | Data memory | 12484608 | 381 | 83886080 | 2560 |
| 1 | Index memory | 688128 | 84 | 19136512 | 2336 |
| 1 | Long message buffer | 262144 | 1024 | 67108864 | 262144 |
| 2 | Data memory | 12451840 | 380 | 83886080 | 2560 |
| 2 | Index memory | 688128 | 84 | 19136512 | 2336 |
| 2 | Long message buffer | 262144 | 1024 | 67108864 | 262144 |
+---------+---------------------+----------+------------+----------+-------------+
6 rows in set (0.01 sec)

mysql> CALL GenerateFakeData(15000, 102400);
Query OK, 1 row affected (2 min 24.93 sec)

mysql> select count(id) from testblob;
+-----------+
| count(id) |
+-----------+
| 15000 |
+-----------+
1 row in set (0.00 sec)

mysql> select * from ndbinfo.memoryusage;
+---------+---------------------+----------+------------+----------+-------------+
| node_id | memory_type | used | used_pages | total | total_pages |
+---------+---------------------+----------+------------+----------+-------------+
| 1 | Data memory | 21954560 | 670 | 83886080 | 2560 |
| 1 | Index memory | 2711552 | 331 | 19136512 | 2336 |
| 1 | Long message buffer | 393216 | 1536 | 67108864 | 262144 |
| 2 | Data memory | 21954560 | 670 | 83886080 | 2560 |
| 2 | Index memory | 2711552 | 331 | 19136512 | 2336 |
| 2 | Long message buffer | 131072 | 512 | 67108864 | 262144 |
+---------+---------------------+----------+------------+----------+-------------+
6 rows in set (0.01 sec)


So adding 15,000 records with a blob of 10k the DataMemory used was 18,186,240, but when I inserted 15,000 100k blobs the DataMemory used was 21,954,560.

The table is configured as disk storage, so the amount of DataMemory used should not be dependent on the size of the blob.

Where am I going wrong, and is there a way to query what is inside DataMemory ?

Any help will be apreciated.

mysqld error (no replies)

$
0
0
I have downloaded 'mysql-5.6.19-winx64'.

I opened the cmd, and typed 'mysqld'.

Then, it said
"[Warning]TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option <see documentation for more details>"

I don't know what to do. Please help me.

getting “table is full” error even if the table size is much smaller than tablespace (no replies)

$
0
0
Currently I am using MySQL NDBCluster 7.3.5. I have created one UNDOFILE hhme.dat with INITIAL_SIZE=200m.

Also one tablespace hhmefep_tbs with DATAFILE hhmefep_tbs.dat having INITIAL_SIZE=500M ENGINE=NDB.

Also the output of query is:

mysql> select FILE_NAME,TOTAL_EXTENTS,FREE_EXTENTS,EXTENT_SIZE, extra from information_schema.FILES where TABLESPACE_NAME='hhmefep_tbs' and FILE_TYPE="DATAFILE";
+-----------------+---------------+--------------+-------------+----------------+
| FILE_NAME | TOTAL_EXTENTS | FREE_EXTENTS | EXTENT_SIZE | extra |
+-----------------+---------------+--------------+-------------+----------------+
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 500 | 21 | 1048576 | CLUSTER_NODE=2 |
+-----------------+---------------+--------------+-------------+----------------+

The DDL for creating this DB schema is as given below:

mysql> CREATE LOGFILE GROUP hhme ADD UNDOFILE 'hhme.dat' UNDO_BUFFER_SIZE=16M INITIAL_SIZE=200m ENGINE=NDB;
Query OK, 0 rows affected (9.70 sec)

mysql> CREATE DATABASE hhmefep;
Query OK, 1 row affected (0.05 sec)

mysql> CREATE TABLESPACE hhmefep_tbs ADD DATAFILE 'hhmefep_tbs.dat' USE LOGFILE GROUP hhme INITIAL_SIZE=500M ENGINE=NDB;
Query OK, 0 rows affected (24.30 sec)

[root@mgmtserver ~]$ ndb_mgm -e "all report mem"
Connected to Management Server at: localhost:1186
Node 1: Data usage is 16%(2723 32K pages of total 16384)
Node 1: Index usage is 9%(1605 8K pages of total 16416)
Node 2: Data usage is 16%(2723 32K pages of total 16384)
Node 2: Index usage is 9%(1605 8K pages of total 16416)

Output of query:

mysql> select FILE_NAME, FREE_EXTENTS*EXTENT_SIZE as bytes_free, extra
-> from information_schema.FILES
-> where TABLESPACE_NAME='hhmefep_tbs'
-> and FILE_TYPE="DATAFILE";
+-----------------+------------+----------------+
| FILE_NAME | bytes_free | extra |
+-----------------+------------+----------------+
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=1 |
| hhmefep_tbs.dat | 22020096 | CLUSTER_NODE=2 |
+-----------------+------------+----------------+

Database total size is 32MB and all tables are using ENGINE=NDB.

Still I am getting "table is full" error when I perform inserts.

Can anyone point out the issue here since 500MB of tablespace is not yet exhausted.

Why am I getting free_extents = 21 ?

Random node and full cluster crash after upgrade from 7.2 to 7.3.x (3 replies)

$
0
0
Hi,

after upgrading from NDB 7.2.13 to 7.3.5 and 7.3.6, we experience random node crashes and finally the whole cluster dies.

Setup:
4 data nodes, 256 GB each, 6 cores with HT enabled each, no numa, pinned threads to CPUs (see config)

Crash errors are mostly (with 7.3.6):

Time: Thursday 24 July 2014 - 22:13:35
Status: Temporary error, restart node
Message: Internal program error (failed ndbrequire) (Internal error, programming error or missing error message, please report a bug)
Error: 2341
Error data: DblqhMain.cpp
Error object: DBLQH (Line: 8862) 0x00000006
Program: ndbmtd
Pid: 22137 thr: 3
Version: mysql-5.6.19 ndb-7.3.6
Trace: /mnt/data/cluster/ndb_4_trace.log.9 [t1..t10]

With 7.3.5 we encountered:
(Version 7.3.5)
tatus: Temporary error, restart node
Message: Assertion (Internal error, programming error or missing error message, please report a bug)
Error: 2301
Error data: Illegal signal received (GSN 40 not added)
Error object: Illegal signal received (GSN 40 not added)
Program: ndbmtd
Pid: 6029 thr: 0
Version: mysql-5.6.17 ndb-7.3.5
Trace: /mnt/data/cluster/ndb_6_trace.log.8 [t1..t10]

More details here http://bugs.mysql.com/bug.php?id=73339


Cluster was upgraded with rolling restart first. After the crashes, we started the nodes with --initial and restored the data with ndb_restore. No we do this nearly twice a day since Monday - memory usage is around 63% of configured cluster memory.

NDB config (important part) here:
[NDBD DEFAULT]
NoOfReplicas=2
Datadir=/mnt/data/cluster
FileSystemPathDD=/mnt/data/cluster
DataMemory=183000M
IndexMemory=53000M
LockPagesInMainMemory=1

MaxNoOfConcurrentOperations=2000000
TransactionDeadlockDetectionTimeout=10000

StringMemory=25
MaxNoOfTables=4096
MaxNoOfOrderedIndexes=2048
MaxNoOfUniqueHashIndexes=512
MaxNoOfAttributes=24576
MaxNoOfTriggers=14336
DiskCheckpointSpeed=100M
FragmentLogFileSize=128M
InitFragmentLogFiles=SPARSE
NoOfFragmentLogFiles=300
RedoBuffer=64M
CompressedLCP=1

TimeBetweenLocalCheckpoints=20
TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=100

MemReportFrequency=30
BackupReportFrequency=10

### Params for setting logging
LogLevelStartup=15
LogLevelShutdown=15
LogLevelCheckpoint=8
LogLevelNodeRestart=15

### Params for increasing Disk throughput
BackupMaxWriteSize=1M
BackupDataBufferSize=16M
BackupLogBufferSize=4M
BackupMemory=20M

### Backup Settings
BackupDataDir=/var/lib/mysql-cluster/backup
CompressedBACKUP=1

#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=60000

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

### Multithreading
ThreadConfig=ldm={count=4,cpubind=2,3,4,5},tc={count=2,cpubind=6,7},recv={count=2,cpubind=8,9},send={count=1,cpubind=10},main={count=1,cpubind=11},io={count=1,cpubind=11}

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

DiskCheckpointSpeedInRestart=100M


Any ideas? Maybe disable thread pinning? Increase max total operations / transactions?

One important thing: all tables are "non-logging" which means, not persistent so it is for sure not a file system related issue.


Thanks!

Christian

MySQL Cluster - Data node still in state "starting" (no replies)

$
0
0
Hello,

When I start my second SQL Data Node, he still in state "starting" :

Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=3 @192.168.70.19 (mysql-5.6.19 ndb-7.3.6, Nodegroup: 0, *)
id=4 @192.168.70.20 (mysql-5.6.19 ndb-7.3.6, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 2 node(s)
id=1 @192.168.70.13 (mysql-5.6.19 ndb-7.3.6)
id=2 @192.168.70.14 (mysql-5.6.19 ndb-7.3.6)

[mysqld(API)] 3 node(s)
id=50 @192.168.70.13 (mysql-5.6.19 ndb-7.3.6)
id=51 @192.168.70.14 (mysql-5.6.19 ndb-7.3.6)
id=52 @192.168.70.15 (mysql-5.6.19 ndb-7.3.6)


In the log I see :

Locked tid = 1476 to CPU ok
Started thread, index = 33, id = 1477, type = NdbfsThread
Locked tid = 1477 to CPU ok
WOPool::init(61, 9)
RWPool::init(22, 14)
RWPool::init(42, 75)
LCPFragWatchdog : WarnElapsed : 20000(ms) MaxElapsed 60000(ms) : period millis : 10000
blockSz: 800, wpp: 8188 -> 624 (76)
RWPool::init(29, 624)
RWPool::init(42, 16)
RWPool::init(62, 12)
RWPool::init(42, 83)
RWPool::init(c2, 18)
RWPool::init(e2, 16)
WOPool::init(41, 8)
RWPool::init(82, 12)
RWPool::init(a2, 54)
WOPool::init(21, 10)
blockSz: 1024, wpp: 8188 -> 816 (28)
RWPool::init(68, 816)
2014-07-29 12:15:31 [ndbd] INFO -- Start phase 0 completed
2014-07-29 12:15:31 [ndbd] INFO -- Using locked memory
2014-07-29 12:15:31 [ndbd] INFO -- timerHandlingLab, expected 10ms sleep, not scheduled for: 181 (ms)

What's wrong ? Did the config start after a moment ?

Best regards

Latest developments in MySQL Cluster - webinar replay and Q&A now available (no replies)

$
0
0
Latest developments in MySQL Cluster - webinar replay and Q&A now available from http://www.clusterdb.com/mysql-cluster/mysql-cluster-latest-developments-webinar-replay-qa

View this webinar to learn how MySQL Cluster 7.3, the latest GA release, enables developer agility by making it far simpler and faster to build your products and web-based applications with MySQL Cluster. You'll also learn how MySQL Cluster and its linear scalability, 99.999% uptime, real-time responsiveness, and ability to perform over 1 BILLION Writes per Minute can help your products and applications meet the needs of the most demanding markets. MySQL Cluster combines these capabilities and the affordability of open source, making it well suited for use as an embedded database.

In this replay you'll learn about the following MySQL Cluster capabilities, including the latest innovations in the 7.3 GA release:
- Auto-sharding (partitioning) across commodity hardware for extreme read and write scalability
- Cross-data center geographic synchronous and asynchronous replication</li>
- Online scaling and schema upgrades, now with improved Connection Thread Scalability
- Real-time optimizations for ultra-low, predictable latency
- Foreign Key Support for tight referential integrity
- SQL and NoSQL interfaces, now with support for Node.js
- Support for MySQL 5.6, allowing use of the latest InnoDB and NDB engines within one database
Integrated HA for 99.999% availability
- Auto-Installer that installs, configures, provisions and tunes a production grade cluster in minutes

Interpreting data node log output. ndb_2_out.log (no replies)

$
0
0
Hi there:

Thank you in advance for assistance.

we have on development environment a mysql cluster 7.3.6 on redhat Enterprise 6.5.
This cluster have four server as follow:

2 API/SQL NODES
2 MGM installed on sql nodes
2 Data Nodes.

This is a master/master configuration cluster.

We're testing several performances on cluster shutting down one data node.
We have several doubts about many lines into output log, for example on phase 5 of startup.

......
restartCreateObj(10) file: 1
restartCreateObj(52) file: 1
restartCreateObj(211) file: 1
restartCreateObj(51) file: 1
restartCreateObj(53) file: 1

.......


Where can we found more information about output log on distinct phases 0-101 in data nodes? (books, pdf ....).


how can we be sure data are replicated (F/F') after downloaded node is available? how can we interpret the log?




Thank you in advance for assistance.

(1062) Duplicate entry '' for key '*UNKNOWN*' (3 replies)

$
0
0
Hi all,

I recently encounter the "(1062) Duplicate entry '' for key '*UNKNOWN*'" error with the following SQL. It is strange that none of the updating value is '', and why is the key *UNKNOWN* ???

Please help.

1) (1062) Duplicate entry '' for key '*UNKNOWN*'
UPDATE common_task SET applicants=applicants+'1' WHERE taskid=5

2) (1062) Duplicate entry '' for key '*UNKNOWN*'
UPDATE common_task SET achievers=achievers+'1' WHERE taskid=10

3) (1062) Duplicate entry '' for key '*UNKNOWN*'
INSERT INTO forum_medallog SET `uid`='6042' , `medalid`='36' , `type`='0' , `dateline`='1407142477' , `expiration`='0' , `status`='0'

4) (1062) Duplicate entry '' for key '*UNKNOWN*'
REPLACE INTO common_mytask SET `uid`='490' , `username`='1ed87718-2e5a-4d3d-b120-5fcffcc9193b' , `taskid`='4' , `csc`='0\\t1407140796' , `dateline`='1407140796'

5) (1062) Duplicate entry '' for key '*UNKNOWN*'
UPDATE common_member_count SET `extcredits1`=`extcredits1`+'2',`posts`=`posts`+'1' WHERE uid IN ('4820')

6) (1062) Duplicate entry '' for key '*UNKNOWN*'
UPDATE common_mytask SET `status`='1' , `csc`='100' , `dateline`='1407139450' WHERE `uid`='4701' AND `taskid`='7'

Trouble importing innodb data into ndb (no replies)

$
0
0
We have set up a cluster 7.3.5 environment with 4 data nodes, each with 64 g of RAM.
We are trying import a large sql dump file from an innodb into it. the dump file is 18 gb.

The first thing we are doing is trying to create an empty schema of the tables, all of which have the ENGINE=InnoDB attribute changed to ENGINE=NDB. After that, we plan to load the dump file with the insert statements only.

The problem is, we can't even load the empty structure .sql dump file without it crashing on the third table with an 'ERROR 1114, table is full error'. And this is with no data!! Any ideas as to what to look into would be very much appreciated. Thank you.

Our config.ini is as follows.

DataMemory=20480MB # How much memory to allocate for data storage
IndexMemory=1024MB # How much memory to allocate for index storage
BackupMemory = 512MB
MaxNoOfTables = 4096
MaxNoOfConcurrentOperations=10000000
MaxNoOfAttributes=4096
MaxNoOfOrderedIndexes = 5000
MaxNoOfUniqueHashIndexes = 5000
NoOfFragmentLogFiles=300
FragmentLogFileSize=256MB

MySQL Cluster logs lot of "scanIndex_abort" (no replies)

$
0
0
Hello,

We are testing our application for performance and we see in the MySQL cluster Data node log a lot of these messages:
...
H'003eb68a H'01703500 scanIndex_abort state: 3
...
No other errors or warnings.

The MySQL Cluster version: mysql-5.5.35 ndb-7.2.15

Can you please help me understand the message: scanIndex_abort state: 3?
What does it mean?

Thanks,

Ovidiu

MySQL cluster dump with logfile (1 reply)

$
0
0
Here's a problem I'm having in MySQL cluster and hoping one of you has an answer since it seems like something pretty obvious.

I'm producing dumpfiles of our MySQL cluster databases which of course include the CREATE LOGFILE GROUP / CREATE TABLESPACE commands in them. There doesn't seem to be any way though to do either of these two things:

1) Ideally, to create dumpfiles which include some version of ... "DROP LOGFILE GROUP IF EXISTS" for logfiles/tablespace so I can import them in existent databases and overwrite the data without producing 'ERROR 1528 (HY000) at line 22: Failed to create LOGFILE GROUP' errors.

As it stands all I can do is have a script which removes the logfile creation from the dumpfile before importing it, which isn't great, because my database already has those.

2) Otherwise, if there's a separate syntax which produces a dumpfile without the logfile/tablespace creation, that would also work.

It just seems that the DROP IF EXISTS syntax should be present for logfiles/tablespace but it doesn't seem to be, unless I'm missing something.

I'd greatly appreciate any help on this.

Regards, John.

Cluster slow down when one sql node is down (no replies)

$
0
0
Hi,

I just started to try MySQL Cluster. One test I'm doing is to take down one sql node while populating data into Cluster. I noticed the insert slowed down dramatically while one sql node is offline. Once that sql node is back online, then everything is back to normal.
Can you explain the slowness? Or where can I look into it?

Thanks,

Jacky

Starting again (no replies)

$
0
0
Hi all,

Someone else started trying to get a setup of mysql cluster running over 3 servers.

On Linux, CentOS release 6.5.

As far as I can tell, server 1 has a management server and an API node. The cluster status indicated it was an API node at least.

Servers 2 and 3 have data nodes.

Primarily, I would like to wipe out the data and start again.

As a secondary objective, I would like to change the API node to an SQL node as we don't have anything that low level.

Any help or pointers in the direction of help would be much appreciated. I didn't want to just stop the servers and delete the data/log files as, being distributed, I wasn't sure it would have the same effect a non cluster mysql server would have.

Kind regards,
Phil

NDB not proper use of INDEXE's (no replies)

$
0
0
Hi,

I need some help! we are running a query in NDBCLUSTER enviroment and is not using the proper indexes (Optimizer) as in INNODB.
While in INNODB the query runs on 0,01s flat on NDBCLUSTER takes ~5s.

Here is the query and the following info of each table in the query:

"SHOW CREATE TABLE foto\G -- engine, indexes"
"SHOW TABLE STATUS LIKE 'galeria_foto'\G -- sizes"
EXPLAIN.

QUERY:

"SELECT F.* FROM foto F INNER JOIN galeria_foto FG ON F.id_foto = FG.id_foto INNER JOIN galeria G ON FG.id_galeria = G.id_galeria WHERE G.historica = 1 ORDER BY fecha_hora_subida DESC LIMIT 10;"

Here are de results in INNODB:

EXPLAIN SELECT F.* FROM foto F INNER JOIN galeria_foto FG ON F.id_foto = FG.id_foto INNER JOIN galeria G ON FG.id_galeria = G.id_galeria WHERE G.historica = 1 ORDER BY fecha_hora_subida DESC LIMIT 10;
mysql> EXPLAIN SELECT F.* FROM foto F INNER JOIN galeria_foto FG ON F.id_foto = FG.id_foto INNER JOIN galeria G ON FG.id_galeria = G.id_galeria WHERE G.historica = 1 ORDER BY fecha_hora_subida DESC LIMIT 10;
+----+-------------+-------+--------+----------------------+-------------------+---------+----------------------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+----------------------+-------------------+---------+----------------------+------+-------------+
| 1 | SIMPLE | F | index | PRIMARY | fecha_hora_subida | 4 | NULL | 10 | |
| 1 | SIMPLE | FG | ref | PRIMARY,galeria_foto | galeria_foto | 4 | MATIAS.F.id_foto | 1 | Using index |
| 1 | SIMPLE | G | eq_ref | PRIMARY,historica | PRIMARY | 4 | MATIAS.FG.id_galeria | 1 | Using where |
+----+-------------+-------+--------+----------------------+-------------------+---------+----------------------+------+-------------+
3 rows in set (0.00 sec)

---------------

SHOW TABLE STATUS LIKE 'foto'\G -- sizes

*************************** 1. row ***************************
Name: foto
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 230740
Avg_row_length: 912
Data_length: 210518016
Max_data_length: 0
Index_length: 23134208
Data_free: 9437184
Auto_increment: 364113
Create_time: 2014-08-27 19:38:32
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.01 sec)

-------------

SHOW TABLE STATUS LIKE 'galeria_foto'\G -- sizes

*************************** 1. row ***************************
Name: galeria_foto
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 301326
Avg_row_length: 398
Data_length: 120209408
Max_data_length: 0
Index_length: 5783552
Data_free: 9437184
Auto_increment: NULL
Create_time: 2014-08-27 19:43:08
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)

-------------

SHOW TABLE STATUS LIKE 'galeria'\G -- sizes
*************************** 1. row ***************************
Name: galeria
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 404
Avg_row_length: 446
Data_length: 180224
Max_data_length: 0
Index_length: 163840
Data_free: 9437184
Auto_increment: 548
Create_time: 2014-08-27 19:43:07
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)


-------------


SHOW CREATE TABLE foto\G -- engine, indexes
*************************** 1. row ***************************
Table: foto
Create Table: CREATE TABLE `foto` (
`id_foto` int(10) NOT NULL AUTO_INCREMENT,
`nombre` varchar(100) DEFAULT NULL,
`nombre_original` varchar(100) DEFAULT NULL,
`epigrafe` varchar(500) DEFAULT NULL,
`mime` varchar(100) DEFAULT NULL,
`path` varchar(255) DEFAULT NULL,
`width` int(10) DEFAULT NULL,
`height` int(10) DEFAULT NULL,
`tamanio` int(10) DEFAULT NULL,
`fecha_hora_subida` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`id_fotografo` int(10) DEFAULT NULL,
`id_categoria` int(10) DEFAULT NULL,
`id_derecho` int(11) DEFAULT NULL COMMENT 'Son los derechos que puede tener una imagen. Copyright',
PRIMARY KEY (`id_foto`),
KEY `id_fotografo` (`id_fotografo`),
KEY `id_categoria` (`id_categoria`),
KEY `id_derecho` (`id_derecho`),
KEY `fecha_hora_subida` (`fecha_hora_subida`)
) ENGINE=InnoDB AUTO_INCREMENT=364113 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)


------------------
SHOW CREATE TABLE galeria_foto\G -- engine, indexes
*************************** 1. row ***************************
Table: galeria_foto
Create Table: CREATE TABLE `galeria_foto` (
`id_galeria` int(10) NOT NULL,
`id_foto` int(10) NOT NULL,
`epigrafe` varchar(500) DEFAULT NULL,
`orden` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_galeria`,`id_foto`),
KEY `galeria_foto` (`id_foto`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)


------------------

SHOW CREATE TABLE galeria\G -- engine, indexes
*************************** 1. row ***************************
Table: galeria
Create Table: CREATE TABLE `galeria` (
`id_galeria` int(10) NOT NULL AUTO_INCREMENT,
`id_categoria` int(10) DEFAULT NULL,
`id_tipo` int(10) DEFAULT NULL,
`id_foto_principal` int(10) DEFAULT NULL,
`id_pais` int(10) DEFAULT NULL,
`id_ciudad` int(10) DEFAULT NULL,
`titulo` varchar(255) DEFAULT NULL,
`descripcion` text,
`fecha` date NOT NULL,
`hora` time NOT NULL,
`id_destino` int(10) DEFAULT NULL,
`id_especial` int(10) DEFAULT NULL,
`path_zip` varchar(255) DEFAULT NULL,
`activo` char(1) NOT NULL DEFAULT 'S',
`historica` int(1) DEFAULT NULL,
PRIMARY KEY (`id_galeria`),
KEY `gal_cat` (`id_categoria`),
KEY `gal_tipo` (`id_tipo`),
KEY `gal_foto` (`id_foto_principal`),
KEY `id_pais` (`id_pais`),
KEY `id_ciudad` (`id_ciudad`),
KEY `fecha` (`fecha`),
KEY `id_destino` (`id_destino`),
KEY `id_especial` (`id_especial`),
KEY `activo` (`activo`),
KEY `historica` (`historica`)
) ENGINE=InnoDB AUTO_INCREMENT=548 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)


-------------

An here is the info for NDBCLUSTER:

EXPLAIN SELECT F.* FROM foto F INNER JOIN galeria_foto FG ON F.id_foto = FG.id_foto INNER JOIN galeria G ON FG.id_galeria = G.id_galeria WHERE G.historica = 1 ORDER BY fecha_hora_subida DESC LIMIT 10;
+----+-------------+-------+--------+------------------------+----------------+---------+---------------------------+------+------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+------------------------+----------------+---------+---------------------------+------+------------------------------------------------------------+
| 1 | SIMPLE | G | ref | PRIMARY,historica | historica | 5 | const | 7 | Parent of 3 pushed join@1; Using temporary; Using filesort |
| 1 | SIMPLE | FG | ref | PRIMARY,idx_id_galeria | idx_id_galeria | 4 | editor_telam.G.id_galeria | 823 | Child of 'G' in pushed join@1 |
| 1 | SIMPLE | F | eq_ref | PRIMARY | PRIMARY | 4 | editor_telam.FG.id_foto | 1 | Child of 'FG' in pushed join@1 |
+----+-------------+-------+--------+------------------------+----------------+---------+---------------------------+------+------------------------------------------------------------+
3 rows in set (0.00 sec)

------------

The tables are created the same way but the ENGINE=ndbcluster.


The query execution plan for INNODB and NDBCLUSTER are different.

Can any one help us on how to correct this issue. We need to use this kind of query in serveral places in our proyect, and we really need to improve the performace and take advatages of NDBCLUSTER.


Thank you
Regards
Matias

NDB Binlog: Node: 4, down, Subscriber bitmask 0 (1 reply)

$
0
0
Our application was not able to handle transactions all of a sudden with a Heuristic Exception.
Caused by: com.atomikos.icatch.HeurMixedException: Heuristic Exception
at com.atomikos.icatch.imp.CoordinatorStateHandler.commit(CoordinatorStateHandler.java:601)
at com.atomikos.icatch.imp.IndoubtStateHandler.commit(IndoubtStateHandler.java:184)
at com.atomikos.icatch.imp.CoordinatorImp.commit(CoordinatorImp.java:715)
at com.atomikos.icatch.imp.CoordinatorImp.terminate(CoordinatorImp.java:975)
at com.atomikos.icatch.imp.CompositeTerminatorImp.commit(CompositeTerminatorImp.java:82)
at com.atomikos.icatch.imp.CompositeTransactionImp.commit(CompositeTransactionImp.java:336)
at com.atomikos.icatch.jta.TransactionImp.commit(TransactionImp.java:208)
... 62 more

From NDB log below, it showed that NDB Binlog Node 4 was down at 22:05:07.
2014-08-30 22:05:07 3786 [Note] NDB Binlog: Node: 4, down, Subscriber bitmask 00

However in the NDB Manager Client, it showed all the nodes were up and running. After a restart of the NDB cluster though the application was able to write to the database. Does anyone have a clue what was going on? Thanks in advance.

online remove mysqld api nodes (no replies)

$
0
0
version: mysql-5.1.56 ndb-7.1.17

I want to remove 4 MYSQLD API nodes from my running cluster. Is it doable or is it whack?

I started the process and removed the following from the config.ini:

[MYSQLD]
NodeId = 35
HostName = 172.16.21.105

[MYSQLD]
NodeId = 36
HostName = 172.16.21.106

[MYSQLD]
NodeId = 37
HostName = 172.16.21.107

[MYSQLD]
NodeId = 38
HostName = 172.16.21.108

After restarting both ndb_mgmd servers they can't see any of the data/api nodes (despite the cluster still functioning). I see a lot of these in the remaining online data/api nodes:

2014-09-03 17:38:42 [ndbd] ERROR -- Could not set dynamic port for 11->35 (TransporterRegistry.cpp:2096) - Repeated 7 times
Viewing all 1560 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>