From 0b6836ec0356e60e50b2ccd9167b56569a2e4d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Boull=C3=A9?= Date: Fri, 15 Dec 2023 14:57:14 +0100 Subject: [PATCH] Fix erroneous errors messages in parallel for unsorted tables Utilisation d'un table principale Root non triee Bug de diagnostique des erreurs Bug en parallel uniquement. Bug reproduit en paralle simule Le message d'erreur en parallele (3 coeurs) reference un mauvais non de cle: - error : Key position sample extractor ./distinct_user_id.txt : Record 2365 : unsorted key [xAPid5D9Lsq8UFw+W5E=...] inferior to preceding key [urLoLv3I8hkuF5NTF1U=...] found 2232 lines before - l'index de record est erronne: 2365 au lieu de 2366 - la valeur du la cle est erronnes [xAPid5D9Lsq8UFw+W5E=...] au lieu de [0howoxSt70H06DU1YUrza5jcxAPid5D9Lsq8UFw+W5E=] Impacts: - KWKeyPositionSampleExtractorTask::SlaveProcess: correction du numero de ligne - KWKey::GetObjectLabel: correction pour prendre le debut de la cle plutot que sa fin --- src/Learning/KWDataUtils/KWKey.cpp | 2 +- .../KWDataUtils/KWKeyPositionSampleExtractorTask.cpp | 2 +- src/Learning/MODL/MODL.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Learning/KWDataUtils/KWKey.cpp b/src/Learning/KWDataUtils/KWKey.cpp index b1b7076d8..d711b3c1d 100644 --- a/src/Learning/KWDataUtils/KWKey.cpp +++ b/src/Learning/KWDataUtils/KWKey.cpp @@ -59,7 +59,7 @@ const ALString KWKey::GetObjectLabel() const if (svFields.GetAt(i).GetLength() <= nFieldMaxLength) sFieldLabel = svFields.GetAt(i); else - sFieldLabel = svFields.GetAt(i).Right(nFieldMaxLength) + "..."; + sFieldLabel = svFields.GetAt(i).Left(nFieldMaxLength) + "..."; // Ajout du libelle du champ de cle sLabel += sFieldLabel; diff --git a/src/Learning/KWDataUtils/KWKeyPositionSampleExtractorTask.cpp b/src/Learning/KWDataUtils/KWKeyPositionSampleExtractorTask.cpp index ae30a4fb3..62c5f2161 100644 --- a/src/Learning/KWDataUtils/KWKeyPositionSampleExtractorTask.cpp +++ b/src/Learning/KWDataUtils/KWKeyPositionSampleExtractorTask.cpp @@ -690,7 +690,7 @@ boolean KWKeyPositionSampleExtractorTask::SlaveProcess() LongintToReadableString(recordKeyPosition->GetLineIndex() - previousRecordKeyPosition->GetLineIndex()) + " lines before", - nCumulatedLineNumber + inputFile.GetCurrentLineIndex() - 1); + nCumulatedLineNumber + inputFile.GetCurrentLineIndex()); delete recordKeyPosition; bOk = false; break; diff --git a/src/Learning/MODL/MODL.cpp b/src/Learning/MODL/MODL.cpp index 5a2d4ac5b..1afb0cfd9 100644 --- a/src/Learning/MODL/MODL.cpp +++ b/src/Learning/MODL/MODL.cpp @@ -34,9 +34,9 @@ int main(int argc, char** argv) Global::ActivateSignalErrorManagement(); // Choix du repertoire de lancement pour le debugage sous Windows (a commenter apres fin du debug) - SetWindowsDebugDir("Standard", "IrisLight"); + // SetWindowsDebugDir("Standard", "IrisLight"); // SetWindowsDebugDir("Standard", "Iris2D"); - // SetWindowsDebugDir("TextVariables", "BuildNonInterpretableNames"); + SetWindowsDebugDir("BugsMultiTables", "BugUnsortedRootTable"); // Parametrage des logs memoires depuis les variables d'environnement, pris en compte dans KWLearningProject // KhiopsMemStatsLogFileName, KhiopsMemStatsLogFrequency, KhiopsMemStatsLogToCollect @@ -58,7 +58,7 @@ int main(int argc, char** argv) // Simulation du mode parallele pour le debuggage // PLParallelTask::SetParallelSimulated(true); - // PLParallelTask::SetSimulatedSlaveNumber(2); + // PLParallelTask::SetSimulatedSlaveNumber(3); // PLParallelTask::SetTracerResources(1); // PLParallelTask::SetTracerProtocolActive(true); // PLParallelTask::SetTracerMPIActive(true);