You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "onewe (via GitHub)" <gi...@apache.org> on 2023/11/21 14:45:49 UTC

[PR] Tst: local test passed [dubbo-rust]

onewe opened a new pull request, #166:
URL: https://github.com/apache/dubbo-rust/pull/166

   - refactor some logic for directory component 
   - BufferedBody use CloneBody instead of generics
   - add CloneInvoker component and remove request param generics
   - add map_request method in the TripleInvoker
   - fix Registry component stack overflow bug
   - remove cache for Route component


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Tst: local test passed [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 commented on code in PR #166:
URL: https://github.com/apache/dubbo-rust/pull/166#discussion_r1401439896


##########
dubbo/src/directory/mod.rs:
##########
@@ -164,26 +160,27 @@ where
 
         let registry = self.inner.clone();
 
-        let (tx, rx) = channel(1024);
+        let (tx, rx) = channel(16);

Review Comment:
   163 and 192 line, define const?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Tst: local test passed [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 commented on code in PR #166:
URL: https://github.com/apache/dubbo-rust/pull/166#discussion_r1400762072


##########
dubbo/src/loadbalancer/mod.rs:
##########
@@ -40,59 +44,50 @@ where
         let svc = self.inner.new_service(target);
 
         LoadBalancer {
-            inner: svc
+            inner: svc,
         }
         
     }
 }
 
-impl<N, Req, Nsv>  Service<Req> for LoadBalancer<N> 
+impl<N>  Service<http::Request<CloneBody>> for LoadBalancer<N> 
 where
-    Req: Send + 'static, 
     // Routes service
-    N: Service<(), Response = Vec<Nsv>> + Clone,
+    N: Service<(), Response = Vec<CloneInvoker<TripleInvoker>>> + Clone,
     N::Error: Into<StdError> + Send,
     N::Future: Send + 'static, 
-    // new invoker
-    Nsv: NewService<()> + Send,
-    Nsv::Service: Service<Req> + Send,
-    // invoker
-    <Nsv::Service as Service<Req>>::Error: Into<StdError> + Send,
-    <Nsv::Service as Service<Req>>::Future: Send + 'static,
 {
     
-    type Response = <Nsv::Service as Service<Req>>::Response;
+    type Response = <CloneInvoker<TripleInvoker> as Service<http::Request<CloneBody>>>::Response;
 
     type Error = StdError;
 
     type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>;
 
     fn poll_ready(&mut self, cx: &mut std::task::Context<'_>) -> std::task::Poll<Result<(), Self::Error>> {
         self.inner.poll_ready(cx).map_err(Into::into)
-        
+    
     }
 
-    fn call(&mut self, req: Req) -> Self::Future {
+    fn call(&mut self, req: http::Request<CloneBody>) -> Self::Future {
         let routes  = self.inner.call(());
 
         let fut = async move {
             let routes = routes.await;
 
-            let routes: Vec<Nsv> = match routes {
+            let routes: Vec<CloneInvoker<TripleInvoker>> = match routes {
                 Err(e) => return Err(Into::<StdError>::into(e)),
                 Ok(routes) => routes
             };
-
-            let service_list: Vec<_> = routes.iter().map(|inv| {
-                let invoker = inv.new_service(());                
+  
+            let service_list: Vec<_> = routes. into_iter().map(|invoker| {            

Review Comment:
   去掉空格



##########
dubbo/src/loadbalancer/mod.rs:
##########
@@ -40,59 +44,50 @@ where
         let svc = self.inner.new_service(target);
 
         LoadBalancer {
-            inner: svc
+            inner: svc,
         }
         
     }
 }
 
-impl<N, Req, Nsv>  Service<Req> for LoadBalancer<N> 
+impl<N>  Service<http::Request<CloneBody>> for LoadBalancer<N> 
 where
-    Req: Send + 'static, 
     // Routes service
-    N: Service<(), Response = Vec<Nsv>> + Clone,
+    N: Service<(), Response = Vec<CloneInvoker<TripleInvoker>>> + Clone,
     N::Error: Into<StdError> + Send,
     N::Future: Send + 'static, 
-    // new invoker
-    Nsv: NewService<()> + Send,
-    Nsv::Service: Service<Req> + Send,
-    // invoker
-    <Nsv::Service as Service<Req>>::Error: Into<StdError> + Send,
-    <Nsv::Service as Service<Req>>::Future: Send + 'static,
 {
     
-    type Response = <Nsv::Service as Service<Req>>::Response;
+    type Response = <CloneInvoker<TripleInvoker> as Service<http::Request<CloneBody>>>::Response;
 
     type Error = StdError;
 
     type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>;
 
     fn poll_ready(&mut self, cx: &mut std::task::Context<'_>) -> std::task::Poll<Result<(), Self::Error>> {
         self.inner.poll_ready(cx).map_err(Into::into)
-        
+    
     }
 
-    fn call(&mut self, req: Req) -> Self::Future {
+    fn call(&mut self, req: http::Request<CloneBody>) -> Self::Future {
         let routes  = self.inner.call(());
 
         let fut = async move {
             let routes = routes.await;
 
-            let routes: Vec<Nsv> = match routes {
+            let routes: Vec<CloneInvoker<TripleInvoker>> = match routes {
                 Err(e) => return Err(Into::<StdError>::into(e)),
                 Ok(routes) => routes
             };
-
-            let service_list: Vec<_> = routes.iter().map(|inv| {
-                let invoker = inv.new_service(());                
+  
+            let service_list: Vec<_> = routes. into_iter().map(|invoker| {            

Review Comment:
   去掉空格



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Tst: local test passed [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 commented on PR #166:
URL: https://github.com/apache/dubbo-rust/pull/166#issuecomment-1823759965

   LGTM! Good work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Tst: local test passed [dubbo-rust]

Posted by "yang20150702 (via GitHub)" <gi...@apache.org>.
yang20150702 merged PR #166:
URL: https://github.com/apache/dubbo-rust/pull/166


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org