List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:January 30 2012 12:32pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3795 to 3796)
View as plain text  
 3796 Jonas Oreland	2012-01-30 [merge]
      ndb - merge 71 to 72

    modified:
      storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
 3795 jonas oreland	2012-01-28
      ndb - arghh fix suppression for bug13637411

    modified:
      mysql-test/suite/ndb_big/bug13637411.test
=== modified file 'storage/ndb/src/kernel/blocks/backup/BackupInit.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2011-07-05 12:46:07 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2012-01-30 12:31:48 +0000
@@ -206,7 +206,31 @@ Backup::execREAD_CONFIG_REQ(Signal* sign
   ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_LOG_BUFFER_MEM, &szLogBuf);
   ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_WRITE_SIZE, &szWrite);
   ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_MAX_WRITE_SIZE, &maxWriteSize);
-  
+
+  if (maxWriteSize < szWrite)
+  {
+    /**
+     * max can't be lower than min
+     */
+    maxWriteSize = szWrite;
+  }
+  if ((maxWriteSize % szWrite) != 0)
+  {
+    /**
+     * max needs to be a multiple of min
+     */
+    maxWriteSize = (maxWriteSize + szWrite - 1) / szWrite;
+    maxWriteSize *= szWrite;
+  }
+
+  /**
+   * add min writesize to buffer size...and the alignment added here and there
+   */
+  Uint32 extra = szWrite + 4 * (/* align * 512b */ 128);
+
+  szDataBuf += extra;
+  szLogBuf += extra;
+
   c_defaults.m_logBufferSize = szLogBuf;
   c_defaults.m_dataBufferSize = szDataBuf;
   c_defaults.m_minWriteSize = szWrite;
@@ -215,8 +239,12 @@ Backup::execREAD_CONFIG_REQ(Signal* sign
 
   Uint32 szMem = 0;
   ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_MEM, &szMem);
-  Uint32 noPages = (szMem + c_defaults.m_lcp_buffer_size + sizeof(Page32) - 1) 
-    / sizeof(Page32);
+
+  szMem += 3 * extra; // (data+log+lcp);
+  Uint32 noPages =
+    (szMem + sizeof(Page32) - 1) / sizeof(Page32) +
+    (c_defaults.m_lcp_buffer_size + sizeof(Page32) - 1) / sizeof(Page32);
+
   // We need to allocate an additional of 2 pages. 1 page because of a bug in
   // ArrayPool and another one for DICTTAINFO.
   c_pagePool.setSize(noPages + NO_OF_PAGES_META_FILE + 2, true); 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (jonas.oreland:3795 to 3796) Jonas Oreland30 Jan