Browse code

Add patch enhance_logging_to_debug_latency_issues.patch

Change-Id: Icb62408ae93d560e92fc52cac8fa1f2a6b23f213
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6762
Tested-by: michellew <michellew@vmware.com>
Reviewed-by: Prakash Arumugam <arumugamprak@vmware.com>

Prakash US1070105 authored on 2019/02/20 04:38:25
Showing 2 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Name:          c-rest-engine
2 2
 Summary:       minimal http(s) server library
3 3
 Version:       1.2
4
-Release:       6%{?dist}
4
+Release:       7%{?dist}
5 5
 Group:         Applications/System
6 6
 Vendor:        VMware, Inc.
7 7
 License:       Apache 2.0
... ...
@@ -18,6 +18,7 @@ Patch4:        ssl_read_error.patch
18 18
 Patch5:        persistent_connection.patch
19 19
 Patch6:        fd_leak.patch
20 20
 Patch7:        http_header_should_be_case_insensitive.patch
21
+Patch8:        enhance_logging_to_debug_latency_issues.patch
21 22
 %define sha1   c-rest-engine=25aa9d1f2680e26114dee18365c510692552f8e4
22 23
 
23 24
 %description
... ...
@@ -42,6 +43,7 @@ development libs and header files for c-rest-engine
42 42
 %patch5 -p1
43 43
 %patch6 -p1
44 44
 %patch7 -p1
45
+%patch8 -p1
45 46
 
46 47
 %build
47 48
 cd build
... ...
@@ -74,6 +76,8 @@ find %{buildroot} -name '*.la' -delete
74 74
 # %doc ChangeLog README COPYING
75 75
 
76 76
 %changelog
77
+*  Tue Feb 19 2019 Prakash Arumugam <arumugamprak@vmware.com> 1.2-7
78
+-  enhance_logging_to_debug_latency_issues.patch.
77 79
 *  Tue Feb 05 2019 Michelle Wang <michellew@vmware.com> 1.2-6
78 80
 -  http_header_should_be_case_insensitive.patch.
79 81
 *  Wed May 09 2018 Kumar Kaushik <kaushikk@vmware.com> 1.2-5
80 82
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+diff --git a/server/restengine/httpProtocolHead.c b/server/restengine/httpProtocolHead.c
1
+index be3ff09..f00c2f6 100644
2
+--- a/server/restengine/httpProtocolHead.c
3
+@@ -1335,7 +1335,7 @@ VmRESTProcessBuffer(
4
+ 
5
+              case PROCESS_APPLICATION_CALLBACK:
6
+                  /**** Give callback to application ****/
7
+-                 VMREST_LOG_INFO(pRESTHandle,"%s","C-REST-ENGINE: Giving callback to application...");
8
++                 VMREST_LOG_DEBUG(pRESTHandle,"%s","C-REST-ENGINE: Giving callback to application...");
9
+                  dwError = VmRESTTriggerAppCb(
10
+                                pRESTHandle,
11
+                                pRequest,
12
+diff --git a/transport/posix/socket.c b/transport/posix/socket.c
13
+index 364ce0e..bb0acee 100644
14
+--- a/transport/posix/socket.c
15
+@@ -869,6 +869,8 @@ VmSockPosixRead(
16
+     dwError = VmRESTLockMutex(pSocket->pMutex);
17
+     BAIL_ON_VMREST_ERROR(dwError);
18
+ 
19
++    VMREST_LOG_INFO(pRESTHandle, "C-REST-ENGINE start reading payload fd %d", pSocket->fd);
20
++
21
+     bLocked = TRUE;
22
+     if (pSocket->pszBuffer)
23
+     {
24
+@@ -974,7 +976,11 @@ VmSockPosixRead(
25
+     *ppszBuffer = pSocket->pszBuffer;
26
+     *nBufLen = pSocket->nBufData;
27
+ 
28
+-    VMREST_LOG_DEBUG(pRESTHandle,"Read status, total bytes(including prev) %u", *nBufLen);
29
++    VMREST_LOG_INFO(
30
++            pRESTHandle,
31
++            "C-REST-ENGINE Read status, total bytes(including prev) %u fd %d",
32
++            *nBufLen,
33
++            pSocket->fd);
34
+ 
35
+ cleanup:
36
+