Browse Source

Merge pull request #4697 from AttilaVamos/HPCC-9791-improvement

HPCC-9791 XML file spray logging improvement

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 years ago
parent
commit
c7274218d9
2 changed files with 7 additions and 1 deletions
  1. 5 1
      dali/ft/daftformat.cpp
  2. 2 0
      dali/ft/fterror.hpp

+ 5 - 1
dali/ft/daftformat.cpp

@@ -1220,6 +1220,7 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
     numInBuffer = bufferOffset = 0;
     if (splitOffset != 0)
     {
+        LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint(splitOffset:%"I64F"d)", splitOffset);
         unsigned delta = (unsigned)(splitOffset & (unitSize-1));
         if (delta)
             splitOffset += (unitSize - delta);
@@ -1244,7 +1245,10 @@ void CXmlQuickPartitioner::findSplitPoint(offset_t splitOffset, PartitionCursor
                     break;
                 }
                 if (sizeAvailable >= format.maxRecordSize)
-                    throwError(DFTERR_EndOfRecordNotFound);
+                {
+                    LOG(MCdebugProgressDetail, unknownJob, "CXmlQuickPartitioner::findSplitPoint: record size (>%d bytes) is larger than expected maxRecordSize (%d bytes) [and blockSize (%d bytes)]", sizeRecord, format.maxRecordSize, blockSize);
+                    throwError3(DFTERR_EndOfXmlRecordNotFound, splitOffset+bufferOffset, sizeRecord, format.maxRecordSize);
+                }
                 LOG(MCdebugProgress, unknownJob, "Failed to find split after reading %d", ensureSize);
                 ensureSize += blockSize;
                 if (ensureSize > format.maxRecordSize)

+ 2 - 0
dali/ft/fterror.hpp

@@ -71,6 +71,7 @@
 #define DFTERR_CannotFindFirstXmlRecord         8098
 #define DFTERR_CannotFindLastXmlRecord          8099
 #define DFTERR_CouldNotOpenCompressedFile       8100
+#define DFTERR_EndOfXmlRecordNotFound           8101
 
 //Internal errors
 #define DFTERR_UnknownFormatType                8190
@@ -130,6 +131,7 @@
 #define DFTERR_CannotPushAndCompress_Text       "Need to pull the data when compressing the output"
 #define DFTERR_CannotFindFirstXmlRecord_Text    "Could not find the start of the first record"
 #define DFTERR_CouldNotOpenCompressedFile_Text  "Could not open file %s as compressed file"
+#define DFTERR_EndOfXmlRecordNotFound_Text      "End of XML record not found (need to increase maxRecordSize?)! At offset:%"I64F"d, record size (>%d bytes) is larger than expected maxRecordSize (%d bytes)."
 
 #define DFTERR_UnknownFormatType_Text           "INTERNAL: Save unknown format type"
 #define DFTERR_OutputOffsetMismatch_Text        "INTERNAL: Output offset does not match expected (%"I64F"d expected %"I64F"d) at %s of block %d"