Question

I'm little noob and learning on how to use mysqlcluster,i have 1 management 2 datanode and 2 sqlnodes.According to a book "mysql cookbook" -alex davies and localcheckpoints and globalcheckpoints

By default, a running MySQL Cluster will commit a Local Checkpoint (LCP)—a copyof all the local data held on disk—every time 4 MB of changes are made to the cluster (since the previous LCP) and global checkpoint (all transactions that have occurred since the last LCP) to disk every two seconds. if the data are fragmented and parts of large tables are striped on those datanodes(database "A" is 1000G and may be divided into two 500G parts) ,

Q1) How can a database still consistent and durable if any one of the datanode server is crashed ?

With Reference to restore DB with ndb_restore if i take backup using "start backup" on management node, it will create backup on the backup directory on each Data Nodes but each backup will only hold the different fragment of table data instead of complete backup(backup taken by mysqldump). I tested backup and it was true where complete database size was around 44G and the backupdir was around 22G on each datanode backup directory. I'am confused and please correct me if I have misconception

Was it helpful?

Solution

Q1: Data is both sharded and duplicated. Probably each of your two datanodes has the entire dataset. If you had, say, 5 nodes, each one could have 2/5 of the data, thereby spreading across 5 machines, yet having 2 copies of everything. And loss of any one node can be recovered from.

Consistency is handled by a "eventual consistency" model. If you write conflicting things to different nodes, the system will 'eventually' discover this. Then some rule (which you established) will kick in to decide which data to keep.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top