Commit a1f9ec01 authored by unknown's avatar unknown

Bug #13197 NDB needs better error message for not enough memory.

- added 2 new error codes for out of data and index memory during SR

+ removed c++ style comments from c file


ndb/include/mgmapi/ndbd_exit_codes.h:
  Bug #13197  	NDB needs better error message for not enough memory.
  - added 2 new error codes for out of data and index memory during SR
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Bug #13197  	NDB needs better error message for not enough memory.
  - added 2 new error codes for out of data and index memory during SR
ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp:
  Bug #13197  	NDB needs better error message for not enough memory.
  - added 2 new error codes for out of data and index memory during SR
parent b1d8aa67
...@@ -102,6 +102,10 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification; ...@@ -102,6 +102,10 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
/* TC 6200-> */ /* TC 6200-> */
/* DIH 6300-> */ /* DIH 6300-> */
#define NDBD_EXIT_MAX_CRASHED_REPLICAS 6300 #define NDBD_EXIT_MAX_CRASHED_REPLICAS 6300
/* ACC 6600-> */
#define NDBD_EXIT_SR_OUT_OF_INDEXMEMORY 6600
/* TUP 6800-> */
#define NDBD_EXIT_SR_OUT_OF_DATAMEMORY 6800
/* LQH 7200-> */ /* LQH 7200-> */
......
...@@ -8158,7 +8158,7 @@ void Dbacc::srReadPagesLab(Signal* signal) ...@@ -8158,7 +8158,7 @@ void Dbacc::srReadPagesLab(Signal* signal)
for (Uint32 i = 0; i < limitLoop; i++) { for (Uint32 i = 0; i < limitLoop; i++) {
jam(); jam();
seizePage(signal); seizePage(signal);
ndbrequire(tresult <= ZLIMIT_OF_ERROR); ndbrequireErr(tresult <= ZLIMIT_OF_ERROR, NDBD_EXIT_SR_OUT_OF_INDEXMEMORY);
fragrecptr.p->datapages[i] = spPageptr.i; fragrecptr.p->datapages[i] = spPageptr.i;
signal->theData[i + 6] = spPageptr.i; signal->theData[i + 6] = spPageptr.i;
}//for }//for
......
...@@ -187,7 +187,7 @@ Dbtup::rfrInitRestartInfoLab(Signal* signal, DiskBufferSegmentInfoPtr dbsiPtr) ...@@ -187,7 +187,7 @@ Dbtup::rfrInitRestartInfoLab(Signal* signal, DiskBufferSegmentInfoPtr dbsiPtr)
const Uint32 pageCount = riPtr.p->sriNumDataPages - regFragPtr.p->noOfPages; const Uint32 pageCount = riPtr.p->sriNumDataPages - regFragPtr.p->noOfPages;
if(pageCount > 0){ if(pageCount > 0){
Uint32 noAllocPages = allocFragPages(regFragPtr.p, pageCount); Uint32 noAllocPages = allocFragPages(regFragPtr.p, pageCount);
ndbrequire(noAllocPages == pageCount); ndbrequireErr(noAllocPages == pageCount, NDBD_EXIT_SR_OUT_OF_DATAMEMORY);
}//if }//if
ndbrequire(getNoOfPages(regFragPtr.p) == riPtr.p->sriNumDataPages); ndbrequire(getNoOfPages(regFragPtr.p) == riPtr.p->sriNumDataPages);
......
...@@ -71,7 +71,7 @@ static const ErrStruct errArray[] = ...@@ -71,7 +71,7 @@ static const ErrStruct errArray[] =
{NDBD_EXIT_INVALID_CONFIG, XCE, {NDBD_EXIT_INVALID_CONFIG, XCE,
"Invalid Configuration fetched from Management Server" }, "Invalid Configuration fetched from Management Server" },
// VM /* VM */
{NDBD_EXIT_OUT_OF_LONG_SIGNAL_MEMORY, XCE, {NDBD_EXIT_OUT_OF_LONG_SIGNAL_MEMORY, XCE,
"Signal lost, out of long signal memory"}, "Signal lost, out of long signal memory"},
{NDBD_EXIT_WATCHDOG_TERMINATE, XIE, "WatchDog terminate"}, {NDBD_EXIT_WATCHDOG_TERMINATE, XIE, "WatchDog terminate"},
...@@ -80,10 +80,18 @@ static const ErrStruct errArray[] = ...@@ -80,10 +80,18 @@ static const ErrStruct errArray[] =
{NDBD_EXIT_SIGNAL_LOST, XIE, "Signal lost (unknown reason)"}, {NDBD_EXIT_SIGNAL_LOST, XIE, "Signal lost (unknown reason)"},
{NDBD_EXIT_ILLEGAL_SIGNAL, XCE, "Illegal signal (version mismatch?)"}, {NDBD_EXIT_ILLEGAL_SIGNAL, XCE, "Illegal signal (version mismatch?)"},
// DIH /* DIH */
{NDBD_EXIT_MAX_CRASHED_REPLICAS, XFI, "To many crasched replicas"}, {NDBD_EXIT_MAX_CRASHED_REPLICAS, XFI, "To many crasched replicas"},
// Ndbfs error messages /* ACC */
{NDBD_EXIT_SR_OUT_OF_INDEXMEMORY, XCE,
"Out of index memory during system restart"},
/* TUP */
{NDBD_EXIT_SR_OUT_OF_DATAMEMORY, XCE,
"Out of data memory during system restart"},
/* Ndbfs error messages */
{NDBD_EXIT_AFS_NOPATH, XCE, "No file system path"}, {NDBD_EXIT_AFS_NOPATH, XCE, "No file system path"},
{2802, XIE, "Channel is full"}, {2802, XIE, "Channel is full"},
{2803, XIE, "No more threads"}, {2803, XIE, "No more threads"},
...@@ -102,7 +110,7 @@ static const ErrStruct errArray[] = ...@@ -102,7 +110,7 @@ static const ErrStruct errArray[] =
{NDBD_EXIT_AFS_NO_SUCH_FILE , XFI, "File not found"}, {NDBD_EXIT_AFS_NO_SUCH_FILE , XFI, "File not found"},
{NDBD_EXIT_AFS_READ_UNDERFLOW , XIE, "Read underflow"}, {NDBD_EXIT_AFS_READ_UNDERFLOW , XIE, "Read underflow"},
// Sentinel /* Sentinel */
{0, XUE, "No message slogan found"} {0, XUE, "No message slogan found"}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment