From 290593003b4c4a6856eb9ee40f19f240a7ae042a Mon Sep 17 00:00:00 2001 From: Rohit Verma Date: Mon, 28 Oct 2024 02:03:15 -0700 Subject: [PATCH 1/5] fix for issue 237 --- remote_function/udf_server.py | 2 ++ src/ImageLoop.cc | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/remote_function/udf_server.py b/remote_function/udf_server.py index 17a5caca..d5f0dfc3 100644 --- a/remote_function/udf_server.py +++ b/remote_function/udf_server.py @@ -56,6 +56,8 @@ def image_api(): return_string += r_meta.encode("utf-8") os.remove(tmpfile) + if return_string == "" or return_string == None: + return "error" return return_string diff --git a/src/ImageLoop.cc b/src/ImageLoop.cc index e4dcef59..057b9fe4 100644 --- a/src/ImageLoop.cc +++ b/src/ImageLoop.cc @@ -330,11 +330,15 @@ void ImageLoop::execute_remote_operations( continue; } cv::Mat dmat = write_image(responseBuffer[rindex]); + if (dmat.rows == 0 || dmat.cols == 0){ + throw VCLException(ObjectEmpty, + "Invalid response from the remote server."); + } if (dmat.empty()) { pendingImages.push_back(img); } - img->shallow_copy_cv(dmat); + img->shallow_copy_cv(dmat); img->update_op_completed(); auto const result = imageMap.insert( From 15f2f4174ce8f79b424fc1f574560e9a0a9e6c6a Mon Sep 17 00:00:00 2001 From: sys_vdms Date: Mon, 28 Oct 2024 14:23:29 +0000 Subject: [PATCH 2/5] Automated updates: Format and/or coverage --- .github/coverage/cpp.develop.coverage_report.txt | 6 +++--- .github/coverage/cpp.develop.coverage_value.txt | 2 +- src/ImageLoop.cc | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/coverage/cpp.develop.coverage_report.txt b/.github/coverage/cpp.develop.coverage_report.txt index 968491b2..6088a972 100644 --- a/.github/coverage/cpp.develop.coverage_report.txt +++ b/.github/coverage/cpp.develop.coverage_report.txt @@ -15,7 +15,7 @@ src/DescriptorsCommand.cc 711 110 15% 56,63-68,73,75 src/DescriptorsManager.cc 24 19 79% 49-50,57-58,73 src/ExceptionsCommand.cc 6 0 0% 35-40 src/ImageCommand.cc 322 157 48% 55,59,63,65,67-69,71,73-76,78,81,86,88-89,97,99,106,109,111-112,114-115,117-118,120-121,124,151,162-163,174-175,177,182-185,195-196,198,203-206,221-229,231-233,246-247,257-267,269-270,272-273,278,286,297,304,308,311,313,315,337,339-340,343-348,350,352,374-376,379-381,385-388,394,396,403-406,420,427,433-436,440-441,452-455,458-463,468-470,481-484,489-493,498-499,501-502,504-508,511,513-517,520-523,526-527,530,532,537 -src/ImageLoop.cc 251 231 92% 63,130,182-185,215,221,265,285,288,297-298,300,307-308,322-323,330,334 +src/ImageLoop.cc 253 232 91% 63,130,182-185,215,221,265,285,288,297-298,300,307-308,322-323,330,334,338 src/Neo4jBaseCommands.cc 38 0 0% 7-8,12,14-15,17,21,23-24,26,30,32-33,35,39,41-42,44,48,50,53,57-59,62-70,72,74,76-77,80 src/Neo4JHandlerCommands.cc 109 0 0% 50,54-55,57-58,61,65-69,72,74,76-80,82,84,86,92,95-96,98,100,102,106-107,110-111,114-119,123-124,126,128-129,132-133,137-139,141,144,149-151,155,157,160,162,165-166,169,172,176-178,180-186,188-191,196,198-201,203,206,209,211-213,217-220,222-225,228-231,233-237,239-244,249 src/OpsIOCoordinator.cc 96 73 76% 48,52,54-55,57,61-63,65,74,78,80,91,93,100,102-103,123,125,133,149,153,203 @@ -54,8 +54,8 @@ utils/src/comm/ConnClient.cc 69 57 82% 49,55,59-60,98 utils/src/comm/Connection.cc 82 61 74% 48-53,75,77-79,84,86,97,111,135,140,153,157,159,168,172 utils/src/comm/ConnServer.cc 61 49 80% 60,64,68,75,84,91,103,108,128,135,140,145 utils/src/comm/Exception.cc 6 0 0% 35-40 -utils/src/stats/SystemStats.cc 250 249 99% 453 +utils/src/stats/SystemStats.cc 250 248 99% 229,453 utils/src/timers/TimerMap.cc 82 75 91% 126,151,153,155-158 ------------------------------------------------------------------------------ -TOTAL 10238 6537 63% +TOTAL 10240 6537 63% ------------------------------------------------------------------------------ diff --git a/.github/coverage/cpp.develop.coverage_value.txt b/.github/coverage/cpp.develop.coverage_value.txt index b82de924..023a1ba9 100644 --- a/.github/coverage/cpp.develop.coverage_value.txt +++ b/.github/coverage/cpp.develop.coverage_value.txt @@ -1 +1 @@ -63.8504 +63.8379 diff --git a/src/ImageLoop.cc b/src/ImageLoop.cc index 057b9fe4..4b718d5f 100644 --- a/src/ImageLoop.cc +++ b/src/ImageLoop.cc @@ -330,15 +330,15 @@ void ImageLoop::execute_remote_operations( continue; } cv::Mat dmat = write_image(responseBuffer[rindex]); - if (dmat.rows == 0 || dmat.cols == 0){ + if (dmat.rows == 0 || dmat.cols == 0) { throw VCLException(ObjectEmpty, - "Invalid response from the remote server."); + "Invalid response from the remote server."); } if (dmat.empty()) { pendingImages.push_back(img); } - img->shallow_copy_cv(dmat); + img->shallow_copy_cv(dmat); img->update_op_completed(); auto const result = imageMap.insert( From 3d8bd718d0259cbea71b06cd65c3fd8eeaf6545a Mon Sep 17 00:00:00 2001 From: sys_vdms Date: Mon, 28 Oct 2024 15:47:32 +0000 Subject: [PATCH 3/5] Automated updates: Format and/or coverage --- .github/coverage/cpp.develop.coverage_report.txt | 4 ++-- .github/coverage/cpp.develop.coverage_value.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/coverage/cpp.develop.coverage_report.txt b/.github/coverage/cpp.develop.coverage_report.txt index 6088a972..01d2bdc8 100644 --- a/.github/coverage/cpp.develop.coverage_report.txt +++ b/.github/coverage/cpp.develop.coverage_report.txt @@ -54,8 +54,8 @@ utils/src/comm/ConnClient.cc 69 57 82% 49,55,59-60,98 utils/src/comm/Connection.cc 82 61 74% 48-53,75,77-79,84,86,97,111,135,140,153,157,159,168,172 utils/src/comm/ConnServer.cc 61 49 80% 60,64,68,75,84,91,103,108,128,135,140,145 utils/src/comm/Exception.cc 6 0 0% 35-40 -utils/src/stats/SystemStats.cc 250 248 99% 229,453 +utils/src/stats/SystemStats.cc 250 249 99% 453 utils/src/timers/TimerMap.cc 82 75 91% 126,151,153,155-158 ------------------------------------------------------------------------------ -TOTAL 10240 6537 63% +TOTAL 10240 6538 63% ------------------------------------------------------------------------------ diff --git a/.github/coverage/cpp.develop.coverage_value.txt b/.github/coverage/cpp.develop.coverage_value.txt index 023a1ba9..c05f4414 100644 --- a/.github/coverage/cpp.develop.coverage_value.txt +++ b/.github/coverage/cpp.develop.coverage_value.txt @@ -1 +1 @@ -63.8379 +63.8477 From daa3ecad5af073ad3bfb5a1206de2e7e8fd05202 Mon Sep 17 00:00:00 2001 From: sys_vdms Date: Fri, 1 Nov 2024 10:52:17 +0000 Subject: [PATCH 4/5] Automated updates: Format and/or coverage --- .github/coverage/cpp.develop.coverage_report.txt | 4 ++-- .github/coverage/cpp.develop.coverage_value.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/coverage/cpp.develop.coverage_report.txt b/.github/coverage/cpp.develop.coverage_report.txt index 5143647e..71337498 100644 --- a/.github/coverage/cpp.develop.coverage_report.txt +++ b/.github/coverage/cpp.develop.coverage_report.txt @@ -4,7 +4,7 @@ Directory: .. ------------------------------------------------------------------------------ File Lines Exec Cover Missing ------------------------------------------------------------------------------ -client/cpp/CSVParserUtil.cpp 345 291 84% 37-45,48,50,239,241,264-265,269-270,286,292,304,313-314,317,323,331-332,335,345,351,363,368,373,379-387,389,425,435-437,474-476,478,503-506 +client/cpp/CSVParserUtil.cpp 345 290 84% 37-45,48,50,239,241,264-265,269-270,286,292,304,313-314,317,323,331-332,335,345,351,363,368,373,379-387,389,425,435-437,474-476,478,503-506,522 client/cpp/VDMSClient.cc 20 20 100% src/AutoDeleteNode.cc 9 8 88% 40 src/BackendNeo4j.cc 121 0 0% 4,6-17,20,24,29-41,46-47,52,55-58,61-62,64-70,73,78,82-83,85-86,89,92,95-96,98,102,104,106-109,111,114-116,118,122,131-132,138,140,142-144,147,150-152,155-159,161-175,178,182,184,186,195,197-200,204-205,207-208,211-215,220,224-226,228 @@ -57,5 +57,5 @@ utils/src/comm/Exception.cc 6 0 0% 35-40 utils/src/stats/SystemStats.cc 250 249 99% 453 utils/src/timers/TimerMap.cc 82 75 91% 126,151,153,155-158 ------------------------------------------------------------------------------ -TOTAL 10241 6571 64% +TOTAL 10243 6571 64% ------------------------------------------------------------------------------ diff --git a/.github/coverage/cpp.develop.coverage_value.txt b/.github/coverage/cpp.develop.coverage_value.txt index ef01e171..ea4c8709 100644 --- a/.github/coverage/cpp.develop.coverage_value.txt +++ b/.github/coverage/cpp.develop.coverage_value.txt @@ -1 +1 @@ -64.1637 +64.1511 From 62e369696638fea66acd0b6e0d025f8d7859e3c5 Mon Sep 17 00:00:00 2001 From: sys_vdms Date: Wed, 6 Nov 2024 06:59:34 +0000 Subject: [PATCH 5/5] Automated updates: Format and/or coverage --- .github/coverage/cpp.develop.coverage_report.txt | 4 ++-- .github/coverage/cpp.develop.coverage_value.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/coverage/cpp.develop.coverage_report.txt b/.github/coverage/cpp.develop.coverage_report.txt index 71337498..689716ee 100644 --- a/.github/coverage/cpp.develop.coverage_report.txt +++ b/.github/coverage/cpp.develop.coverage_report.txt @@ -4,7 +4,7 @@ Directory: .. ------------------------------------------------------------------------------ File Lines Exec Cover Missing ------------------------------------------------------------------------------ -client/cpp/CSVParserUtil.cpp 345 290 84% 37-45,48,50,239,241,264-265,269-270,286,292,304,313-314,317,323,331-332,335,345,351,363,368,373,379-387,389,425,435-437,474-476,478,503-506,522 +client/cpp/CSVParserUtil.cpp 345 291 84% 37-45,48,50,239,241,264-265,269-270,286,292,304,313-314,317,323,331-332,335,345,351,363,368,373,379-387,389,425,435-437,474-476,478,503-506 client/cpp/VDMSClient.cc 20 20 100% src/AutoDeleteNode.cc 9 8 88% 40 src/BackendNeo4j.cc 121 0 0% 4,6-17,20,24,29-41,46-47,52,55-58,61-62,64-70,73,78,82-83,85-86,89,92,95-96,98,102,104,106-109,111,114-116,118,122,131-132,138,140,142-144,147,150-152,155-159,161-175,178,182,184,186,195,197-200,204-205,207-208,211-215,220,224-226,228 @@ -57,5 +57,5 @@ utils/src/comm/Exception.cc 6 0 0% 35-40 utils/src/stats/SystemStats.cc 250 249 99% 453 utils/src/timers/TimerMap.cc 82 75 91% 126,151,153,155-158 ------------------------------------------------------------------------------ -TOTAL 10243 6571 64% +TOTAL 10243 6572 64% ------------------------------------------------------------------------------ diff --git a/.github/coverage/cpp.develop.coverage_value.txt b/.github/coverage/cpp.develop.coverage_value.txt index ea4c8709..2b9c7c96 100644 --- a/.github/coverage/cpp.develop.coverage_value.txt +++ b/.github/coverage/cpp.develop.coverage_value.txt @@ -1 +1 @@ -64.1511 +64.1609