Change cpu inheritance timing 76/319876/1
authorIlho Kim <ilho159.kim@samsung.com>
Wed, 19 Feb 2025 05:30:55 +0000 (14:30 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Wed, 19 Feb 2025 05:36:14 +0000 (14:36 +0900)
If the pkginfo-server is creating a cache, cpu inheritance is
unnecessary because the client directly accesses db get getting data

Change-Id: I00e5fd457d7ec3124e6d75b9f7fee352108efdf3
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/client/pkginfo_client.cc

index d82810e3a5483336e27716c754c2fcb3395fb384..d2ca8d548387609c46e2814ee1e0384e3c7fc38e 100644 (file)
@@ -87,8 +87,6 @@ bool PkgInfoClient::SendRequest() {
     return RequestHandlerDirectAccess(&p);
   }
 
-  cpu_inheritance_invoker_.SetCPUInheritance();
-
   if (!check_server.IsReady() && !check_server.Check()) {
     LOG(WARNING) << "Server is not ready, try to direct access"
         ", Request type: " << pkgmgr_common::ReqTypeToString(req_type_);
@@ -99,6 +97,7 @@ bool PkgInfoClient::SendRequest() {
   LOG(WARNING) << "Try to send request, Request type: "
       << pkgmgr_common::ReqTypeToString(req_type_);
 
+  cpu_inheritance_invoker_.SetCPUInheritance();
   if (!socket_->Connect(req_type_)) {
     LOG(ERROR) << "Failed to connect client socket, try to direct access"
         ", Request type: " << pkgmgr_common::ReqTypeToString(req_type_);