[jira] [Resolved] (SCB-171) Identify the microservice implement framework version
[ https://issues.apache.org/jira/browse/SCB-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-171. -- Resolution: Fixed The PR was merged into master branch. > Identify the microservice implement framework version > -- > > Key: SCB-171 > URL: https://issues.apache.org/jira/browse/SCB-171 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > Attachments: type.PNG > > Original Estimate: 168h > Remaining Estimate: 168h > > As a Java Chassis user , I want to identify my microservice implement > framework and version so that I can do management in console according to > their capabilities > 1. SDK report their framework type and version when register to SC > 2. Each service with specific version has a certain framework+version > 3. Present the type/version information in console in Service+Version level > 4. In gov service, send the different command to CC according to the > type/version when doing management- -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-197) Add a embedded console perfStatics output for debug
[ https://issues.apache.org/jira/browse/SCB-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326744#comment-16326744 ] Willem Jiang commented on SCB-197: -- Hi, [~zhengyangyong] What's the status of this issue? > Add a embedded console perfStatics output for debug > --- > > Key: SCB-197 > URL: https://issues.apache.org/jira/browse/SCB-197 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > we need a embedded console perfStatics replace old PerfStatMonitorMgr in > foundation-metrics: > her is a > example:https://github.com/wujimin/java-chassis/blob/transport-optimize-for-reactive/demo/perf/src/main/java/io/servicecomb/demo/perf/PerfMetricsFilePublisher.java -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-165) Service registry not given proper instances
[ https://issues.apache.org/jira/browse/SCB-165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-165: Assignee: liubao > Service registry not given proper instances > > > Key: SCB-165 > URL: https://issues.apache.org/jira/browse/SCB-165 > Project: Apache ServiceComb > Issue Type: Bug > Components: Java-Chassis >Reporter: liubao >Assignee: liubao >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > 1. when calling DynamicSchemaLoader at start up, and when the dependent > service is not registered when making calls, service center will not notify > client when service is registered. > 2. when autodiscovery is enabled and service center is not started, > microservice will start fail. > 3. when retrying in service center , if one instance failed, and when a lots > of calls to service center is made, next fallback address may have many > choose again to the failed instance. If this takes too long, will cause > instance idle and unregistered by service center. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-237) [pack] acceptance tests of all scenarios
[ https://issues.apache.org/jira/browse/SCB-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326743#comment-16326743 ] Yin Xiang commented on SCB-237: --- recommend to use cucumber to build all scenarios on top of SCB-151 > [pack] acceptance tests of all scenarios > > > Key: SCB-237 > URL: https://issues.apache.org/jira/browse/SCB-237 > Project: Apache ServiceComb > Issue Type: Test > Components: Saga >Reporter: Yin Xiang >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-237) [pack] acceptance tests of all scenarios
Yin Xiang created SCB-237: - Summary: [pack] acceptance tests of all scenarios Key: SCB-237 URL: https://issues.apache.org/jira/browse/SCB-237 Project: Apache ServiceComb Issue Type: Test Components: Saga Reporter: Yin Xiang -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yin Xiang resolved SCB-220. --- Resolution: Fixed Fix Version/s: saga-0.1.0 > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > Fix For: saga-0.1.0 > > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-234) [pack] fail fast if alpha cluster down
[ https://issues.apache.org/jira/browse/SCB-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326705#comment-16326705 ] ASF GitHub Bot commented on SCB-234: seanyinx commented on a change in pull request #120: SCB-234 fail fast at SagaStart if all alpha clusters are down URL: https://github.com/apache/incubator-servicecomb-saga/pull/120#discussion_r161642097 ## File path: omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSender.java ## @@ -150,13 +155,15 @@ private MessageSender fastestSender() { .filter(entry -> entry.getValue() < Long.MAX_VALUE) .min(Comparator.comparingLong(Entry::getValue)) .map(Entry::getKey) -.orElse((event -> { +.orElse(event -> { + clusterStatus.setHealthy(false); try { availableMessageSenders.take().send(event); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } -})); + clusterStatus.setHealthy(true); Review comment: this implement is a bit complex. consider Open Closed principle. how can we use that with MessageSender? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] fail fast if alpha cluster down > -- > > Key: SCB-234 > URL: https://issues.apache.org/jira/browse/SCB-234 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.1.0 > > > when alpha cluster is down, future transactions should fail immediately at > @SagaStart instead of keep retrying, in order not to stress the services > further by blocking all the request threads. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-234) [pack] fail fast if alpha cluster down
[ https://issues.apache.org/jira/browse/SCB-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326706#comment-16326706 ] ASF GitHub Bot commented on SCB-234: seanyinx commented on a change in pull request #120: SCB-234 fail fast at SagaStart if all alpha clusters are down URL: https://github.com/apache/incubator-servicecomb-saga/pull/120#discussion_r161642173 ## File path: omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSender.java ## @@ -150,13 +155,15 @@ private MessageSender fastestSender() { .filter(entry -> entry.getValue() < Long.MAX_VALUE) .min(Comparator.comparingLong(Entry::getValue)) .map(Entry::getKey) -.orElse((event -> { +.orElse(event -> { + clusterStatus.setHealthy(false); Review comment: sending events are blocking. using a single thread means handling a single transaction request at a time. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] fail fast if alpha cluster down > -- > > Key: SCB-234 > URL: https://issues.apache.org/jira/browse/SCB-234 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.1.0 > > > when alpha cluster is down, future transactions should fail immediately at > @SagaStart instead of keep retrying, in order not to stress the services > further by blocking all the request threads. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326692#comment-16326692 ] ASF GitHub Bot commented on SCB-220: seanyinx closed pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-12) Support Custom Metrics
[ https://issues.apache.org/jira/browse/SCB-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] yangyongzheng reassigned SCB-12: Assignee: yangyongzheng > Support Custom Metrics > -- > > Key: SCB-12 > URL: https://issues.apache.org/jira/browse/SCB-12 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > User can inject custom business metrics into MetricsRegistry then get them > back with build-in metrics together,need support this basic metric type: > 1.Counter > 2.Guage > 3.Max > 4.Min > 5.Rate > 6.Custom Callback with Fun0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326678#comment-16326678 ] ASF GitHub Bot commented on SCB-220: seanyinx commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161644223 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: maybe. and also possible when network unstable This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326675#comment-16326675 ] ASF GitHub Bot commented on SCB-220: eric-lee-ltk commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161643423 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: duplicate started event with the same localTxId? Does this happen when the omega recovers? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-150) Add Success / Fail Dimension for Invocation
[ https://issues.apache.org/jira/browse/SCB-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326672#comment-16326672 ] ASF GitHub Bot commented on SCB-150: wujimin commented on issue #508: [SCB-150] Add Status(success/failed) dimension to operation call count and tps URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/508#issuecomment-357825918 2xx/3xx/4xx/5xx almost equals statusCode and 3xx need to support special logic: 304 belongs success i thinks, for metrics kernel data, we care for statusCode but for data published interface, we can provide different model for different scenes This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Success / Fail Dimension for Invocation > --- > > Key: SCB-150 > URL: https://issues.apache.org/jira/browse/SCB-150 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > Attachments: screenshot-1.png > > > Add Success / Fail Dimension for Invocation,new metric available : > !screenshot-1.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326669#comment-16326669 ] ASF GitHub Bot commented on SCB-220: seanyinx commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161641801 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: i don't quite understand. there may be duplicate started event, and how to make sure count(2) to exclude compensated event? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Lee resolved SCB-227. -- Resolution: Fixed Fix Version/s: saga-0.1.0 > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.1.0 > > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-150) Add Success / Fail Dimension for Invocation
[ https://issues.apache.org/jira/browse/SCB-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326662#comment-16326662 ] ASF GitHub Bot commented on SCB-150: WillemJiang commented on issue #508: [SCB-150] Add Status(success/failed) dimension to operation call count and tps URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/508#issuecomment-357822555 There could be lots's of dimensions if we create the counter per status code. My suggestion is we only provide 2xx, 3xx, 4xx, 5xx status code for it. BTW, we can take the Spring Boot actuator as an example, we don't need lots detail metrics, we just need to tell the administrator something is wrong, and you can find more information by looking up the access log. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Success / Fail Dimension for Invocation > --- > > Key: SCB-150 > URL: https://issues.apache.org/jira/browse/SCB-150 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > Attachments: screenshot-1.png > > > Add Success / Fail Dimension for Invocation,new metric available : > !screenshot-1.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (SCB-236) SagaStarted should be failed when all of the alpha servers are unavailable
[ https://issues.apache.org/jira/browse/SCB-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Zheng Feng closed SCB-236. -- Resolution: Duplicate > SagaStarted should be failed when all of the alpha servers are unavailable > --- > > Key: SCB-236 > URL: https://issues.apache.org/jira/browse/SCB-236 > Project: Apache ServiceComb > Issue Type: Bug > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > > currently the MessageSender.send( ) will be blocked until the backend alpha > servers become available. When none of the alphas are reachable at > @sagastart, we shall immediately fail the transaction. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326336#comment-16326336 ] ASF GitHub Bot commented on SCB-227: coveralls commented on issue #114: SCB-227 stop sub tx from running when global tx failed URL: https://github.com/apache/incubator-servicecomb-saga/pull/114#issuecomment-357712036 [![Coverage Status](https://coveralls.io/builds/15055245/badge)](https://coveralls.io/builds/15055245) Coverage decreased (-0.2%) to 94.891% when pulling **366edd4a5e89b120d9069be303a88c8a76a28fbb on eric-lee-ltk:SCB-227** into **5f1dce30b6cb4b761e3db9b9c6b9d55baa4cb46e on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326308#comment-16326308 ] ASF GitHub Bot commented on SCB-220: eric-lee-ltk commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161541397 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: Suppose there are two queries: 1. query that retrieves all the StartedEvent with a given globalTxId 2. query that retrieves events of either Started, Ended or Compensated of a given globalTxId, events are group by the localTxId and we can filter compensated events based on the count(2, either Started or Ended) of each group using the `having`. Finally, we join the above queries to get the events that need to compensate. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-234) [pack] fail fast if alpha cluster down
[ https://issues.apache.org/jira/browse/SCB-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326300#comment-16326300 ] ASF GitHub Bot commented on SCB-234: WillemJiang commented on a change in pull request #120: SCB-234 fail fast at SagaStart if all alpha clusters are down URL: https://github.com/apache/incubator-servicecomb-saga/pull/120#discussion_r161537114 ## File path: omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSender.java ## @@ -150,13 +155,15 @@ private MessageSender fastestSender() { .filter(entry -> entry.getValue() < Long.MAX_VALUE) .min(Comparator.comparingLong(Entry::getValue)) .map(Entry::getKey) -.orElse((event -> { +.orElse(event -> { + clusterStatus.setHealthy(false); Review comment: The clusterStatus check and setting is not atomic. maybe we should consider to use single thread to send the event message. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] fail fast if alpha cluster down > -- > > Key: SCB-234 > URL: https://issues.apache.org/jira/browse/SCB-234 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.1.0 > > > when alpha cluster is down, future transactions should fail immediately at > @SagaStart instead of keep retrying, in order not to stress the services > further by blocking all the request threads. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-231) Only publish the snapshot in master branch
[ https://issues.apache.org/jira/browse/SCB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-231: Assignee: Zheng Feng > Only publish the snapshot in master branch > -- > > Key: SCB-231 > URL: https://issues.apache.org/jira/browse/SCB-231 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Zheng Feng >Priority: Major > Labels: easyfix > Fix For: saga-0.1.0 > > > Current we publish the snapshot per PR, it makes sense that we only publish > the SNAPSHOT on when the PR is merged master branch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-232) EventType should be same between omega and alpha
[ https://issues.apache.org/jira/browse/SCB-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-232. -- Resolution: Fixed > EventType should be same between omega and alpha > > > Key: SCB-232 > URL: https://issues.apache.org/jira/browse/SCB-232 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-231) Only publish the snapshot in master branch
[ https://issues.apache.org/jira/browse/SCB-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-231. -- Resolution: Fixed Fix Version/s: saga-0.1.0 > Only publish the snapshot in master branch > -- > > Key: SCB-231 > URL: https://issues.apache.org/jira/browse/SCB-231 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Zheng Feng >Priority: Major > Labels: easyfix > Fix For: saga-0.1.0 > > > Current we publish the snapshot per PR, it makes sense that we only publish > the SNAPSHOT on when the PR is merged master branch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-232) EventType should be same between omega and alpha
[ https://issues.apache.org/jira/browse/SCB-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-232: - Fix Version/s: (was: saga-0.3.0) saga-0.1.0 > EventType should be same between omega and alpha > > > Key: SCB-232 > URL: https://issues.apache.org/jira/browse/SCB-232 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-233) Don't deploy if building with the PR
[ https://issues.apache.org/jira/browse/SCB-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-233. -- Resolution: Fixed > Don't deploy if building with the PR > > > Key: SCB-233 > URL: https://issues.apache.org/jira/browse/SCB-233 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.1.0 > > > currently the travis CI runs the deploy command when building with the PR. we > should improve this step. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-224) [pack] retry sub-transaction on failure
[ https://issues.apache.org/jira/browse/SCB-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326259#comment-16326259 ] ASF GitHub Bot commented on SCB-224: WillemJiang commented on issue #117: [WIP] SCB-224 support retry sub-transaction URL: https://github.com/apache/incubator-servicecomb-saga/pull/117#issuecomment-357691737 @zhang2014 Could you rebase the change and fix the conflict? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] retry sub-transaction on failure > --- > > Key: SCB-224 > URL: https://issues.apache.org/jira/browse/SCB-224 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Priority: Major > > as a user, i want to retry transaction in my service, so that it can always > be done eventually. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326235#comment-16326235 ] ASF GitHub Bot commented on SCB-227: seanyinx commented on a change in pull request #114: SCB-227 stop sub tx from running when global tx failed URL: https://github.com/apache/incubator-servicecomb-saga/pull/114#discussion_r161518352 ## File path: omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSender.java ## @@ -150,13 +153,14 @@ private MessageSender fastestSender() { .filter(entry -> entry.getValue() < Long.MAX_VALUE) .min(Comparator.comparingLong(Entry::getValue)) .map(Entry::getKey) -.orElse((event -> { +.orElse(event -> { try { -availableMessageSenders.take().send(event); - } catch (InterruptedException e) { +return availableMessageSenders.take().send(event); + } catch (InterruptedException ignored) { Thread.currentThread().interrupt(); } -})); + throw new OmegaException("Failed to send event " + event + " due to interruption"); Review comment: preferably to move this line to catch clause and pass interrupted exception to its constructor This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326232#comment-16326232 ] ASF GitHub Bot commented on SCB-225: codecov-io commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357683331 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=h1) Report > Merging [#249](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/57c1da3d798761ba939c4521891973b2dea2026a?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/graphs/tree.svg?token=GAaF7zrg8R=pr=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #249 +/- ## === Coverage 69.43% 69.43% === Files 17 17 Lines3537 3537 === Hits 2456 2456 Misses913 913 Partials 168 168 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/service\_dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2VydmljZV9kZXBlbmRlbmN5Lmdv) | `74.78% <0%> (-0.87%)` | :arrow_down: | | [server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `76.02% <0%> (+0.58%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=footer). Last update [57c1da3...b0a20b2](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/249?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326231#comment-16326231 ] ASF GitHub Bot commented on SCB-225: coveralls commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357683193 [![Coverage Status](https://coveralls.io/builds/15053459/badge)](https://coveralls.io/builds/15053459) Coverage remained the same at 73.034% when pulling **b0a20b25bfb222dc8c5c4863cb544b7601ca744f on asifdxtreme:master** into **57c1da3d798761ba939c4521891973b2dea2026a on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326234#comment-16326234 ] ASF GitHub Bot commented on SCB-227: seanyinx commented on a change in pull request #114: SCB-227 stop sub tx from running when global tx failed URL: https://github.com/apache/incubator-servicecomb-saga/pull/114#discussion_r161516895 ## File path: omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/TransactionAspect.java ## @@ -57,7 +59,13 @@ Object advise(ProceedingJoinPoint joinPoint, Compensable compensable) throws Thr context.newLocalTxId(); TimeAwareInterceptor interceptor = new TimeAwareInterceptor(this.interceptor); -interceptor.preIntercept(localTxId, signature, joinPoint.getArgs()); +AlphaResponse response = interceptor.preIntercept(localTxId, signature, joinPoint.getArgs()); +if (response.aborted()) { + String abortedLocalTxId = context.localTxId(); + context.setLocalTxId(localTxId); + throw new InvalidTransactionException("Abort local sub transaction " + abortedLocalTxId + Review comment: local transaction is sub transaction, "Aborted sub transaction... because global transaction ..." This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-225) How to build a SC cluster
[ https://issues.apache.org/jira/browse/SCB-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326224#comment-16326224 ] ASF GitHub Bot commented on SCB-225: asifdxtreme commented on issue #249: SCB-225 Deployment guide for running SC in cluster mode URL: https://github.com/apache/incubator-servicecomb-service-center/pull/249#issuecomment-357681246 Preview : https://github.com/asifdxtreme/incubator-servicecomb-service-center/blob/master/docs/sc-cluster.md This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > How to build a SC cluster > - > > Key: SCB-225 > URL: https://issues.apache.org/jira/browse/SCB-225 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: Mohammad Asif Siddiqui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326214#comment-16326214 ] ASF GitHub Bot commented on SCB-220: eric-lee-ltk commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161450039 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: How about using the group by and having similar to the following statement? ```sql SELECT xxx FROM TxEventEnvelope t INNER JOIN (SELECT globalTxId FROM TxEventEnvelope WHERE type = 'TxStartedEvent' OR type = 'TxEndedEvent' OR type = 'TxCompensatedEvent' GROUP BY globalTxId HAVING COUNT(*) = 2) AS t1 ON t.globalTxId = t1.globalTxId; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-234) [pack] fail fast if alpha cluster down
[ https://issues.apache.org/jira/browse/SCB-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326200#comment-16326200 ] ASF GitHub Bot commented on SCB-234: eric-lee-ltk opened a new pull request #120: SCB-234 fail fast at SagaStart if all alpha clusters are down URL: https://github.com/apache/incubator-servicecomb-saga/pull/120 Signed-off-by: Eric LeeFollow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] fail fast if alpha cluster down > -- > > Key: SCB-234 > URL: https://issues.apache.org/jira/browse/SCB-234 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.1.0 > > > when alpha cluster is down, future transactions should fail immediately at > @SagaStart instead of keep retrying, in order not to stress the services > further by blocking all the request threads. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326152#comment-16326152 ] ASF GitHub Bot commented on SCB-227: coveralls commented on issue #114: SCB-227 stop sub tx from running when global tx failed URL: https://github.com/apache/incubator-servicecomb-saga/pull/114#issuecomment-357660283 [![Coverage Status](https://coveralls.io/builds/15052124/badge)](https://coveralls.io/builds/15052124) Coverage increased (+0.07%) to 95.186% when pulling **1d2349555a6cd864e24efee2e64ac6dcb0820efc on eric-lee-ltk:SCB-227** into **5f1dce30b6cb4b761e3db9b9c6b9d55baa4cb46e on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326141#comment-16326141 ] ASF GitHub Bot commented on SCB-220: coveralls commented on issue #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#issuecomment-357657187 [![Coverage Status](https://coveralls.io/builds/15051962/badge)](https://coveralls.io/builds/15051962) Coverage decreased (-0.8%) to 94.279% when pulling **6fdbdc2524b02a7d837abfb628278fb066838028 on SCB-220_avoid_redundant_compensation** into **5f1dce30b6cb4b761e3db9b9c6b9d55baa4cb46e on master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326129#comment-16326129 ] ASF GitHub Bot commented on SCB-220: seanyinx commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161488071 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: one of the sub queries in exists and the other is not exists. i am not sure how that can be done in a single join... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-232) EventType should be same between omega and alpha
[ https://issues.apache.org/jira/browse/SCB-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326065#comment-16326065 ] ASF GitHub Bot commented on SCB-232: coveralls commented on issue #118: SCB-232 EventType should be same between omega and alpha URL: https://github.com/apache/incubator-servicecomb-saga/pull/118#issuecomment-357636097 [![Coverage Status](https://coveralls.io/builds/15050767/badge)](https://coveralls.io/builds/15050767) Coverage decreased (-0.04%) to 94.818% when pulling **02794f4e6dd950d8f7370086a192516138126d49 on zhfeng:SCB-232** into **7bfb6a9fa5014970bff4aaccb5a1b25e22495220 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > EventType should be same between omega and alpha > > > Key: SCB-232 > URL: https://issues.apache.org/jira/browse/SCB-232 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.3.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326054#comment-16326054 ] ASF GitHub Bot commented on SCB-220: seanyinx commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161470583 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: did you try this query? left join returns all records from left table... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-150) Add Success / Fail Dimension for Invocation
[ https://issues.apache.org/jira/browse/SCB-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326040#comment-16326040 ] ASF GitHub Bot commented on SCB-150: zhengyangyong commented on issue #508: [SCB-150] Add Status(success/failed) dimension to operation call count and tps URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/508#issuecomment-357630359 maybe it's better add statusCode dimension, not succ/fail @wujimin I just think it's necessary split them so detail ? @WillemJiang @seanyinx what's your suggestion thanks This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Success / Fail Dimension for Invocation > --- > > Key: SCB-150 > URL: https://issues.apache.org/jira/browse/SCB-150 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > Attachments: screenshot-1.png > > > Add Success / Fail Dimension for Invocation,new metric available : > !screenshot-1.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-236) SagaStarted should be failed when all of the alpha servers are unavailable
Zheng Feng created SCB-236: -- Summary: SagaStarted should be failed when all of the alpha servers are unavailable Key: SCB-236 URL: https://issues.apache.org/jira/browse/SCB-236 Project: Apache ServiceComb Issue Type: Bug Components: Saga Reporter: Zheng Feng Assignee: Zheng Feng currently the MessageSender.send( ) will be blocked until the backend alpha servers become available. When none of the alphas are reachable at @sagastart, we shall immediately fail the transaction. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-227) [pack] stop sub transaction from running when global tx failed
[ https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325997#comment-16325997 ] ASF GitHub Bot commented on SCB-227: eric-lee-ltk commented on a change in pull request #114: SCB-227 stop sub tx from running when global tx failed URL: https://github.com/apache/incubator-servicecomb-saga/pull/114#discussion_r161452246 ## File path: omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/TransactionAspect.java ## @@ -57,7 +57,13 @@ Object advise(ProceedingJoinPoint joinPoint, Compensable compensable) throws Thr context.newLocalTxId(); TimeAwareInterceptor interceptor = new TimeAwareInterceptor(this.interceptor); -interceptor.preIntercept(localTxId, signature, joinPoint.getArgs()); +AlphaResponse response = interceptor.preIntercept(localTxId, signature, joinPoint.getArgs()); +if (response.aborted()) { + String abortedLocalTxId = context.localTxId(); + context.setLocalTxId(localTxId); + throw new OmegaTxAbortedException("Abort local sub transaction " + abortedLocalTxId + Review comment: using the spring's TransactionException will introduce spring dependency in our omega transaction module, is it all right to do so? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] stop sub transaction from running when global tx failed > -- > > Key: SCB-227 > URL: https://issues.apache.org/jira/browse/SCB-227 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > > sub transactions may be started in parallel among multiple services. > if one of them failed, none of them shall start at all, if not already > started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-235) Optimize quota check log
[ https://issues.apache.org/jira/browse/SCB-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325994#comment-16325994 ] ASF GitHub Bot commented on SCB-235: codecov-io commented on issue #248: SCB-235 Optimize quota check log URL: https://github.com/apache/incubator-servicecomb-service-center/pull/248#issuecomment-356535738 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=h1) Report > Merging [#248](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/fbbe18037c66fd4b11e813dabe8e17d049daee05?src=pr=desc) will **increase** coverage by `0.56%`. > The diff coverage is `63.11%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/graphs/tree.svg?height=150=650=GAaF7zrg8R=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=tree) ```diff @@Coverage Diff @@ ## master #248 +/- ## == + Coverage 68.87% 69.43% +0.56% == Files 17 17 Lines3547 3537 -10 == + Hits 2443 2456 +13 + Misses930 913 -17 + Partials 174 168 -6 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv) | `71.38% <55.55%> (+0.62%)` | :arrow_up: | | [server/service/schema.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hLmdv) | `74.83% <59.09%> (+1.79%)` | :arrow_up: | | [server/service/microservices.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvbWljcm9zZXJ2aWNlcy5nbw==) | `73.62% <60%> (+0.77%)` | :arrow_up: | | [server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `75.43% <80%> (+1.01%)` | :arrow_up: | | [server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==) | `76.82% <83.33%> (+1.18%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=footer). Last update [fbbe180...196fc75](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/248?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Optimize quota check log > > > Key: SCB-235 > URL: https://issues.apache.org/jira/browse/SCB-235 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m1 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-235) Optimize quota check log
[ https://issues.apache.org/jira/browse/SCB-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325993#comment-16325993 ] ASF GitHub Bot commented on SCB-235: coveralls commented on issue #248: SCB-235 Optimize quota check log URL: https://github.com/apache/incubator-servicecomb-service-center/pull/248#issuecomment-357612342 [![Coverage Status](https://coveralls.io/builds/15049736/badge)](https://coveralls.io/builds/15049736) Coverage increased (+0.4%) to 73.034% when pulling **196fc751a42ac91e6faa9d472d17e84aa5fadbd6 on aseTo2016:aseTo2016** into **fbbe18037c66fd4b11e813dabe8e17d049daee05 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Optimize quota check log > > > Key: SCB-235 > URL: https://issues.apache.org/jira/browse/SCB-235 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m1 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-220) [pack] duplicate abort event filter to avoid redundant compensation
[ https://issues.apache.org/jira/browse/SCB-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325984#comment-16325984 ] ASF GitHub Bot commented on SCB-220: eric-lee-ltk commented on a change in pull request #116: SCB-220 avoid redundant compensation URL: https://github.com/apache/incubator-servicecomb-saga/pull/116#discussion_r161450039 ## File path: alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/TxEventEnvelopeRepository.java ## @@ -19,15 +19,33 @@ import java.util.List; +import org.apache.servicecomb.saga.alpha.core.TxEvent; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; interface TxEventEnvelopeRepository extends CrudRepository{ - TxEventEnvelope findByEventGlobalTxId(String globalTxId); + List findByEventGlobalTxId(String globalTxId); - @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.server.TxEventEnvelope(" + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + ") FROM TxEventEnvelope t " + "WHERE t.event.globalTxId = ?1 AND t.event.type = ?2") - List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + List findByEventGlobalTxIdAndEventType(String globalTxId, String type); + + TxEventEnvelope findFirstByEventGlobalTxIdAndEventLocalTxIdAndEventType(String globalTxId, String localTxId, String type); + + @Query("SELECT DISTINCT new org.apache.servicecomb.saga.alpha.core.TxEvent(" + + "t.event.serviceName, t.event.instanceId, t.event.globalTxId, t.event.localTxId, t.event.parentTxId, t.event.type, t.event.compensationMethod, t.event.payloads" + + ") FROM TxEventEnvelope t " + + "WHERE t.event.globalTxId = ?1 AND t.event.type = 'TxStartedEvent' AND EXISTS ( " + + " FROM TxEventEnvelope t1 " + + " WHERE t1.event.globalTxId = ?1 " + + " AND t1.event.localTxId = t.event.localTxId " + + " AND t1.event.type = 'TxEndedEvent'" + + ") AND NOT EXISTS ( " + + " FROM TxEventEnvelope t2 " + + " WHERE t2.event.globalTxId = ?1 " + + " AND t2.event.localTxId = t.event.localTxId " + + " AND t2.event.type = 'TxCompensatedEvent')") + List findStartedEventsWithMatchingEndedButNotCompensatedEvents(String globalTxId); Review comment: How about using the group by and having similar to the following statement? ```sql SELECT xxx FROM TxEventEnvelope t LEFT JOIN (SELECT globalTxId FROM TxEventEnvelope WHERE type = 'TxStartedEvent' OR type = 'TxEndedEvent' OR type = 'TxCompensatedEvent' GROUP BY globalTxId HAVING COUNT(*) = 2) AS t1 ON t.globalTxId = t1.globalTxId; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] duplicate abort event filter to avoid redundant compensation > --- > > Key: SCB-220 > URL: https://issues.apache.org/jira/browse/SCB-220 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Yin Xiang >Assignee: Yin Xiang >Priority: Major > > aborted events may be triggered by multiple services in the same LLT, we have > to filter them, so that we don't trigger compensation more than once. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-233) Don't deploy if building with the PR
[ https://issues.apache.org/jira/browse/SCB-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325979#comment-16325979 ] ASF GitHub Bot commented on SCB-233: zhfeng commented on a change in pull request #119: SCB-233 update to deploy only with non PR building URL: https://github.com/apache/incubator-servicecomb-saga/pull/119#discussion_r161449469 ## File path: .travis.yml ## @@ -27,7 +27,7 @@ script: - mvn clean install -Pjacoco -Pdocker coveralls:report - mvn clean verify -f saga-demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs after_success: -- mvn deploy -DskipTests --settings .travis.settings.xml +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then mvn deploy -DskipTests --settings .travis.settings.xml; fi Review comment: see http://docs.travis-ci.com/user/ci-environment/ TRAVIS_BRANCH * for push builds, or builds not triggered by a pull request, this is the name of the branch. * for builds triggered by a pull request this is the name of the branch targeted by the pull request. * for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG). So it looks like in many case of the pull request, the branch target is "master". This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Don't deploy if building with the PR > > > Key: SCB-233 > URL: https://issues.apache.org/jira/browse/SCB-233 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Zheng Feng >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.3.0 > > > currently the travis CI runs the deploy command when building with the PR. we > should improve this step. -- This message was sent by Atlassian JIRA (v7.6.3#76005)