Skip to content

Commit 2e74bba

Browse files
Mikael Ronströmprashanttekriwal
authored andcommitted
WL#8069: Enabled some debug output, more printout before crash, a minor switch of two calls for clarity
(cherry picked from commit 47231e2fbaeec301b024729ed581237eccfe38ad)
1 parent c8e627c commit 2e74bba

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

storage/ndb/src/kernel/blocks/backup/Backup.cpp

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static NDB_TICKS startTime;
102102
#define DEB_LCP_DEL(arglist) do { } while (0)
103103
#endif
104104

105-
//#define DEBUG_LCP_STAT 1
105+
#define DEBUG_LCP_STAT 1
106106
#ifdef DEBUG_LCP_STAT
107107
#define DEB_LCP_STAT(arglist) do { g_eventLogger->info arglist ; } while (0)
108108
#else
@@ -7284,11 +7284,26 @@ Backup::fragmentCompleted(Signal* signal,
72847284
* the LCP scan in an orderly manner with no rows read. So we
72857285
* should not crash in this case.
72867286
*/
7287-
ndbrequire(errCode != 0 ||
7288-
ptr.p->m_row_count == filePtr.p->m_lcp_inserts ||
7289-
((ptr.p->m_num_parts_in_this_lcp != BackupFormat::NDB_MAX_LCP_PARTS) &&
7290-
(ptr.p->m_row_count >=
7291-
(filePtr.p->m_lcp_inserts + filePtr.p->m_lcp_writes))));
7287+
if (!(errCode != 0 ||
7288+
ptr.p->m_row_count == filePtr.p->m_lcp_inserts ||
7289+
((ptr.p->m_num_parts_in_this_lcp !=
7290+
BackupFormat::NDB_MAX_LCP_PARTS) &&
7291+
(ptr.p->m_row_count >=
7292+
(filePtr.p->m_lcp_inserts + filePtr.p->m_lcp_writes)))))
7293+
{
7294+
g_eventLogger->info("errCode = %u, row_count = %llu, inserts: %llu"
7295+
", writes: %llu, parts: %u",
7296+
errCode,
7297+
ptr.p->m_row_count,
7298+
filePtr.p->m_lcp_inserts,
7299+
filePtr.p->m_lcp_writes,
7300+
ptr.p->m_num_parts_in_this_lcp);
7301+
ndbrequire(errCode != 0 ||
7302+
ptr.p->m_row_count == filePtr.p->m_lcp_inserts ||
7303+
((ptr.p->m_num_parts_in_this_lcp != BackupFormat::NDB_MAX_LCP_PARTS) &&
7304+
(ptr.p->m_row_count >=
7305+
(filePtr.p->m_lcp_inserts + filePtr.p->m_lcp_writes))));
7306+
}
72927307

72937308
ptr.p->slaveState.setState(STOPPING);
72947309

storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,9 +2198,8 @@ Dbtup::handle_lcp_keep(Signal* signal,
21982198
* current page temporarily. This can be found in copytuple[0]
21992199
* where handle_lcp_keep_commit puts it.
22002200
*/
2201-
remove_top_from_lcp_keep_list(fragPtr.p, copytuple, tmp);
2202-
22032201
c_backup->change_current_page_temp(copytuple[0]);
2202+
remove_top_from_lcp_keep_list(fragPtr.p, copytuple, tmp);
22042203
DEB_LCP_KEEP(("(%u)tab(%u,%u) page(%u,%u): Handle LCP keep insert entry",
22052204
instance(),
22062205
fragPtr.p->fragTableId,

0 commit comments

Comments
 (0)