You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "justdebugit (JIRA)" <ji...@apache.org> on 2018/07/13 03:08:00 UTC

[jira] [Created] (SCB-739) It is useless for @SagaStart timeout,and it could not be compensated under @SagaStart

justdebugit created SCB-739:
-------------------------------

             Summary: It is useless for @SagaStart timeout,and it could not be compensated under @SagaStart
                 Key: SCB-739
                 URL: https://issues.apache.org/jira/browse/SCB-739
             Project: Apache ServiceComb
          Issue Type: Bug
          Components: Saga
    Affects Versions: saga-0.3.0
         Environment: saga-spring-cloud-demo,Java8,Mac,Intellj Idea
            Reporter: justdebugit


I don't know what SagaStart annotation timeout use, because the timeout is not work.
In the spring cloud demo,if hotel set a wrong address or port,the car service may not be compensated
{code:java}
 @SagaStart(timeout = 60000) //timeout no use,can not affect compensate 
  @PostMapping("/booking/{name}/{rooms}/{cars}")
  public String order(@PathVariable String name,  @PathVariable Integer rooms, @PathVariable Integer cars) {

    template.postForEntity(
        carServiceUrl + "/order/{name}/{cars}",
        null, String.class, name, cars);

   //if set a wrong hotel address,car service compensated method not be triggered
    template.postForEntity(
        hotelServiceUrl + "/order/{name}/{rooms}",
        null, String.class, name, rooms);
    
     postBooking();

     return name + " booking " + rooms + " rooms and " + cars + " cars OK";
}
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)