Skip to content

Commit fb8dd11

Browse files
Mikael Ronströmprashanttekriwal
authored andcommitted
WL#8069: Post-push fix: A bit more work on the debugging framework for Partial LCP
(cherry picked from commit 04aa7c4d023de5d50ae25d747785aedcd2db73d2)
1 parent 3541b48 commit fb8dd11

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ extern EventLogger *g_eventLogger;
3131

3232
#ifdef VM_TRACE
3333
//#define DEBUG_LCP 1
34-
//#define DEBUG_ROW_COUNT 1
34+
//#define DEBUG_ROW_COUNT_DEL 1
35+
//#define DEBUG_ROW_COUNT_INS 1
3536
//#define DEBUG_LCP_SKIP_DELETE_EXTRA 1
3637
//#define DEBUG_DELETE_EXTRA 1
3738
//#define DEBUG_INSERT_EXTRA 1
@@ -467,7 +468,7 @@ Dbtup::dealloc_tuple(Signal* signal,
467468
{
468469
ndbrequire(regFragPtr->m_row_count > 0);
469470
regFragPtr->m_row_count--;
470-
#ifdef DEBUG_ROW_COUNT
471+
#ifdef DEBUG_ROW_COUNT_DEL
471472
Local_key rowid = regOperPtr->m_tuple_location;
472473
rowid.m_page_no = page->frag_page_id;
473474
g_eventLogger->info("(%u) tab(%u,%u) Deleted row(%u,%u)"
@@ -1028,7 +1029,7 @@ Dbtup::commit_operation(Signal* signal,
10281029
if (!regOperPtr->op_struct.bit_field.m_tuple_existed_at_start)
10291030
{
10301031
regFragPtr->m_row_count++;
1031-
#ifdef DEBUG_ROW_COUNT
1032+
#ifdef DEBUG_ROW_COUNT_INS
10321033
Local_key rowid = regOperPtr->m_tuple_location;
10331034
rowid.m_page_no = pagePtr.p->frag_page_id;
10341035
g_eventLogger->info("(%u) tab(%u,%u) Inserted row(%u,%u)"

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#ifdef VM_TRACE
4141
//#define DEBUG_LCP 1
4242
//#define DEBUG_DELETE 1
43+
//#define DEBUG_DELETE_NR 1
4344
//#define DEBUG_LCP_LGMAN 1
4445
#endif
4546
#ifdef DEBUG_LCP
@@ -54,6 +55,12 @@
5455
#define DEB_DELETE(arglist) do { } while (0)
5556
#endif
5657

58+
#ifdef DEBUG_DELETE_NR
59+
#define DEB_DELETE_NR(arglist) do { g_eventLogger->info arglist ; } while (0)
60+
#else
61+
#define DEB_DELETE_NR(arglist) do { } while (0)
62+
#endif
63+
5764
#ifdef DEBUG_LCP_LGMAN
5865
#define DEB_LCP_LGMAN(arglist) do { g_eventLogger->info arglist ; } while (0)
5966
#else
@@ -4784,17 +4791,19 @@ Dbtup::nr_delete(Signal* signal, Uint32 senderData,
47844791
Local_key disk;
47854792
memcpy(&disk, ptr->get_disk_ref_ptr(tablePtr.p), sizeof(disk));
47864793

4787-
DEB_DELETE(("(%u)nr_delete, tab(%u,%u) row(%u,%u), gci: %u",
4788-
instance(),
4789-
fragPtr.p->fragTableId,
4790-
fragPtr.p->fragmentId,
4791-
key->m_page_no,
4792-
key->m_page_idx,
4793-
*ptr->get_mm_gci(tablePtr.p)));
4794-
47954794
/* A row is deleted as part of Copy fragment or Restore */
47964795
fragPtr.p->m_row_count--;
47974796

4797+
DEB_DELETE_NR(("(%u)nr_delete, tab(%u,%u) row(%u,%u), gci: %u"
4798+
", row_count: %llu",
4799+
instance(),
4800+
fragPtr.p->fragTableId,
4801+
fragPtr.p->fragmentId,
4802+
key->m_page_no,
4803+
key->m_page_idx,
4804+
*ptr->get_mm_gci(tablePtr.p),
4805+
fragPtr.p->m_row_count));
4806+
47984807
if (tablePtr.p->m_attributes[MM].m_no_of_varsize +
47994808
tablePtr.p->m_attributes[MM].m_no_of_dynamic)
48004809
{

0 commit comments

Comments
 (0)