[GitHub] imlidian opened a new pull request #40: Using java chassis in spring boot dir translation
imlidian opened a new pull request #40: Using java chassis in spring boot dir translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/40 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 With regards, Apache Git Services
[GitHub] imlidian opened a new pull request #39: References handlers dir translation
imlidian opened a new pull request #39: References handlers dir translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/39 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 With regards, Apache Git Services
[GitHub] wujimin commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI
wujimin commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/878#issuecomment-414537873 i already have a APM agent project to show how to trace ServiceComb invocation i will put it to our samples directory. we will have ability to get more invocation detail by the enchanced mechanism ![image](https://user-images.githubusercontent.com/16874843/44378641-ded23280-a534-11e8-9e85-9c6437f3554f.png) 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 With regards, Apache Git Services
[GitHub] veily edited a comment on issue #424: Docker hub 中的service center 镜像说明需要优化
veily edited a comment on issue #424: Docker hub 中的service center 镜像说明需要优化 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/424#issuecomment-414530543 SC ENV : BACKEND_ADDRESS for etcd server list scfrontend ENV: BACKEND_ADDRESS for sc http API 变量名建议区分一下,部署的时候容器搞混淆。 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 With regards, Apache Git Services
[GitHub] veily commented on issue #424: Docker hub 中的service center 镜像说明需要优化
veily commented on issue #424: Docker hub 中的service center 镜像说明需要优化 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/424#issuecomment-414530543 SC ENV : BACKEND_ADDRESS for etcd server list scfrontend ENV: BACKEND_ADDRESS for sc http API 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #377: 是否支持etcd 自签TLS证书配置?
little-cui commented on issue #377: 是否支持etcd 自签TLS证书配置? URL: https://github.com/apache/incubator-servicecomb-service-center/issues/377#issuecomment-414530355 thanks, @veily 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 With regards, Apache Git Services
[GitHub] veily opened a new issue #424: Docker hub 中的service center 镜像说明需要优化
veily opened a new issue #424: Docker hub 中的service center 镜像说明需要优化 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/424 1. Dockerfile 链接 404 见后面附图 2. 建议在docherhub 镜像说明文字中将传入的环境变量说明一下,方便用户在不看源码的情况下将etcd集群地址传入,便于基于容器部署SC. 3. scfrontend docker镜像建议 同上 附图: ![image](https://user-images.githubusercontent.com/1586298/44376861-e7266f80-a52c-11e8-9584-6622689423a8.png) ![image](https://user-images.githubusercontent.com/1586298/44376966-64ea7b00-a52d-11e8-8ddf-382be0e9ebeb.png) 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 With regards, Apache Git Services
[incubator-servicecomb-saga] branch SCB-665 updated (4efa3a9 -> 718893b)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git. from 4efa3a9 SCB-817 Updated the grpc file of TccEventService new 11fdb91 SCB-817 Updated the TCC grpc contract file new 718893b SCB-818 Omega supports of TCC (WIP) The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../omega/transaction/tcc/TccEventService.java | 27 ++ .../transaction/tcc/TccParticipatorAspect.java | 14 +-- .../tcc/TccStartAnnotationProcessor.java | 26 ++--- .../saga/omega/transaction/tcc/TccStartAspect.java | 4 ++-- ...articipateEvent.java => ParticipatedEvent.java} | 22 +- .../{TccEndEvent.java => TccEndedEvent.java} | 11 + .../{TccStartEvent.java => TccStartedEvent.java} | 11 - .../servicecomb/saga/common/TransactionStatus.java | 7 +++--- .../src/main/proto/GrpcTccEvent.proto | 3 ++- 9 files changed, 91 insertions(+), 34 deletions(-) create mode 100644 omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java rename omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/{ParticipateEvent.java => ParticipatedEvent.java} (55%) rename omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/{TccEndEvent.java => TccEndedEvent.java} (80%) rename omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/{TccStartEvent.java => TccStartedEvent.java} (82%) copy saga-core/src/main/java/org/apache/servicecomb/saga/core/SagaLog.java => pack-common/src/main/java/org/apache/servicecomb/saga/common/TransactionStatus.java (89%)
[incubator-servicecomb-saga] 02/02: SCB-818 Omega supports of TCC (WIP)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 718893b050f288ed60e79fd85b61f66705334c2e Author: Willem Jiang AuthorDate: Tue Aug 21 10:25:13 2018 +0800 SCB-818 Omega supports of TCC (WIP) --- .../omega/transaction/tcc/TccEventService.java | 25 - .../transaction/tcc/TccParticipatorAspect.java | 14 ++-- .../tcc/TccStartAnnotationProcessor.java | 26 ++ .../saga/omega/transaction/tcc/TccStartAspect.java | 4 ++-- .../transaction/tcc/events/ParticipatedEvent.java | 10 ++--- .../transaction/tcc/events/TccEndedEvent.java | 4 ++-- .../transaction/tcc/events/TccStartedEvent.java| 4 ++-- 7 files changed, 61 insertions(+), 26 deletions(-) diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java index 1649620..ae011bc 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java @@ -1,4 +1,27 @@ package org.apache.servicecomb.saga.omega.transaction.tcc; -public class TccService { +import org.apache.servicecomb.saga.omega.transaction.AlphaResponse; +import org.apache.servicecomb.saga.omega.transaction.TxEvent; +import org.apache.servicecomb.saga.omega.transaction.tcc.events.ParticipatedEvent; +import org.apache.servicecomb.saga.omega.transaction.tcc.events.TccEndedEvent; +import org.apache.servicecomb.saga.omega.transaction.tcc.events.TccStartedEvent; + +public interface TccEventService { + + void onConnected(); + + void onDisconnected(); + + void close(); + + String target(); + + AlphaResponse participate(ParticipatedEvent participateEvent); + + AlphaResponse TccTransactionStart(TccStartedEvent tccStartEvent); + + AlphaResponse TccTransactionStop(TccEndedEvent tccEndEvent); + + AlphaResponse send(TxEvent event); + } diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccParticipatorAspect.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccParticipatorAspect.java index 02adac2..e64bc2a 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccParticipatorAspect.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccParticipatorAspect.java @@ -20,6 +20,7 @@ package org.apache.servicecomb.saga.omega.transaction.tcc; import java.lang.invoke.MethodHandles; import java.lang.reflect.Method; +import org.apache.servicecomb.saga.common.TransactionStatus; import org.apache.servicecomb.saga.omega.context.OmegaContext; import org.apache.servicecomb.saga.omega.transaction.MessageSender; import org.apache.servicecomb.saga.omega.transaction.OmegaException; @@ -27,6 +28,7 @@ import org.apache.servicecomb.saga.omega.transaction.RecoveryPolicy; import org.apache.servicecomb.saga.omega.transaction.RecoveryPolicyFactory; import org.apache.servicecomb.saga.omega.transaction.annotations.Compensable; import org.apache.servicecomb.saga.omega.transaction.annotations.Participate; +import org.apache.servicecomb.saga.omega.transaction.tcc.events.ParticipatedEvent; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; @@ -39,9 +41,11 @@ public class TccParticipatorAspect { private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private final OmegaContext context; + private final TccEventService tccEventService; - public TccParticipatorAspect(MessageSender sender, OmegaContext context) { + public TccParticipatorAspect(TccEventService tccEventService, OmegaContext context) { this.context = context; +this.tccEventService = tccEventService; } @Around("execution(@org.apache.servicecomb.saga.omega.transaction.annotations.Participate * *(..)) && @annotation(participate)") @@ -49,6 +53,7 @@ public class TccParticipatorAspect { Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); String localTxId = context.localTxId(); String cancelMethod = participate.cancelMethod(); +String confirmMethod = participate.confirmMethod(); context.newLocalTxId(); LOG.debug("Updated context {} for participate method {} ", context, method.toString()); @@ -56,13 +61,18 @@ public class TccParticipatorAspect { try { Object result = joinPoint.proceed(); // Send the participate message back + tccEventService.participate(new
[incubator-servicecomb-saga] 01/02: SCB-817 Updated the TCC grpc contract file
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 11fdb9123e837f969c7c7c3b22485544a630f32e Author: Willem Jiang AuthorDate: Tue Aug 21 09:59:02 2018 +0800 SCB-817 Updated the TCC grpc contract file --- .../omega/transaction/tcc/TccEventService.java | 4 .../{TccStartEvent.java => ParticipatedEvent.java} | 22 +- .../{TccEndEvent.java => TccEndedEvent.java} | 9 ++--- .../{TccStartEvent.java => TccStartedEvent.java} | 9 +++-- .../servicecomb/saga/common/TransactionStatus.java | 6 -- .../src/main/proto/GrpcTccEvent.proto | 3 ++- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java new file mode 100644 index 000..1649620 --- /dev/null +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccEventService.java @@ -0,0 +1,4 @@ +package org.apache.servicecomb.saga.omega.transaction.tcc; + +public class TccService { +} diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartEvent.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/ParticipatedEvent.java similarity index 77% copy from omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartEvent.java copy to omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/ParticipatedEvent.java index 416c182..73ede9c 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartEvent.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/ParticipatedEvent.java @@ -16,26 +16,22 @@ */ package org.apache.servicecomb.saga.omega.transaction.tcc.events; -public class TccStartEvent { + +public class ParticipateEvent { + private final String globalTxId; private final String localTxId; private final String parentTxId; + private final String confirmMethod; + private final String cancelMethod; - public String getGlobalTxId() { -return globalTxId; - } - - public String getLocalTxId() { -return localTxId; - } - - public String getParentTxId() { -return parentTxId; - } - public TccStartEvent(String globalTxId, String localTxId, String parentTxId) { + public ParticipateEvent(String globalTxId, String localTxId, String parentTxId, String confirmMethod, + String cancelMethod) { this.globalTxId = globalTxId; this.localTxId = localTxId; this.parentTxId = parentTxId; +this.confirmMethod = confirmMethod; +this.cancelMethod = cancelMethod; } } diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndedEvent.java similarity index 82% rename from omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java rename to omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndedEvent.java index 541489f..9107ab0 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndedEvent.java @@ -16,15 +16,18 @@ */ package org.apache.servicecomb.saga.omega.transaction.tcc.events; +import org.apache.servicecomb.saga.common.TransactionStatus; + public class TccEndEvent { private final String globalTxId; private final String localTxId; - private final String parentTxId; + private final TransactionStatus status; - public TccEndEvent(String globalTxId, String localTxId, String parentTxId) { + public TccEndEvent(String globalTxId, String localTxId, + TransactionStatus status) { this.globalTxId = globalTxId; this.localTxId = localTxId; -this.parentTxId = parentTxId; +this.status = status; } } diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartEvent.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartedEvent.java similarity index 84% rename from omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccStartEvent.java rename to
[GitHub] veily commented on issue #377: 是否支持etcd 自签TLS证书配置?
veily commented on issue #377: 是否支持etcd 自签TLS证书配置? URL: https://github.com/apache/incubator-servicecomb-service-center/issues/377#issuecomment-414528700 Doc file renamed security-tls.md,not security_tls.md. https://github.com/apache/incubator-servicecomb-service-center/blob/master/docs/security-tls.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 With regards, Apache Git Services
[GitHub] veily commented on issue #377: 是否支持etcd 自签TLS证书配置?
veily commented on issue #377: 是否支持etcd 自签TLS证书配置? URL: https://github.com/apache/incubator-servicecomb-service-center/issues/377#issuecomment-414528237 @little-cui 404 error ![image](https://user-images.githubusercontent.com/1586298/44376607-e2ad8700-a52b-11e8-9842-85b632f7c0a0.png) 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 With regards, Apache Git Services
[GitHub] liubao68 closed pull request #878: [SCB-854] BootListener support load by not only spring bean, but also SPI
liubao68 closed pull request #878: [SCB-854] BootListener support load by not only spring bean, but also SPI URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/878 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/servicecomb/core/BootListener.java b/core/src/main/java/org/apache/servicecomb/core/BootListener.java index b3b875543..848ccdc31 100644 --- a/core/src/main/java/org/apache/servicecomb/core/BootListener.java +++ b/core/src/main/java/org/apache/servicecomb/core/BootListener.java @@ -45,5 +45,9 @@ public void setEventType(EventType eventType) { } } + default int getOrder() { +return 0; + } + void onBootEvent(BootEvent event); } diff --git a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java index 1bc46c94e..dcd877f40 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -16,7 +16,10 @@ */ package org.apache.servicecomb.core; +import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; +import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -36,6 +39,7 @@ import org.apache.servicecomb.core.provider.producer.ProducerProviderManager; import org.apache.servicecomb.core.transport.TransportManager; import org.apache.servicecomb.foundation.common.event.EventManager; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask; @@ -70,7 +74,6 @@ private volatile SCBStatus status = SCBStatus.DOWN; - public void setStatus(SCBStatus status) { this.status = status; } @@ -115,7 +118,12 @@ public void setSchemaListenerManager( } public void setBootListenerList(Collection bootListenerList) { -this.bootListenerList = bootListenerList; +List tmp = new ArrayList<>(); +tmp.addAll(bootListenerList); +tmp.addAll(SPIServiceUtils.getOrLoadSortedService(BootListener.class)); +tmp.sort(Comparator.comparingInt(BootListener::getOrder)); + +this.bootListenerList = tmp; } protected void triggerEvent(EventType eventType) { diff --git a/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java b/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java index 177a46bb3..ea6371b46 100644 --- a/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java +++ b/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java @@ -18,6 +18,7 @@ package org.apache.servicecomb.core; import java.util.ArrayList; +import java.util.Arrays; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.servicecomb.config.ConfigUtil; @@ -26,6 +27,7 @@ import org.apache.servicecomb.core.provider.consumer.ReferenceConfig; import org.apache.servicecomb.core.provider.producer.ProducerProviderManager; import org.apache.servicecomb.core.transport.TransportManager; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.consumer.AppManager; @@ -134,4 +136,23 @@ public void getReferenceConfigForInvoke_down(@Mocked ConsumerProviderManager con .is("InvocationException: code=503;msg=CommonExceptionData [message=The request is rejected. Cannot process the request due to STATUS = DOWN]")); engine.getReferenceConfigForInvoke(null); } + + @Test + public void setBootListenerList(@Mocked BootListener beanListener, @Mocked BootListener spiListener) { +new Expectations(SPIServiceUtils.class) { + { +beanListener.getOrder(); +result = 1; +spiListener.getOrder(); +result = 0; +SPIServiceUtils.getOrLoadSortedService(BootListener.class); +result = Arrays.asList(spiListener); + } +}; + +SCBEngine engine = new SCBEngine(); +engine.setBootListenerList(Arrays.asList(beanListener)); + +Assert.assertThat(engine.getBootListenerList(), Matchers.contains(spiListener, beanListener)); + } } 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 With
[incubator-servicecomb-java-chassis] branch master updated: [SCB-854] BootListener support load by not only spring bean, but also SPI
This is an automated email from the ASF dual-hosted git repository. liubao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git The following commit(s) were added to refs/heads/master by this push: new 3c7f128 [SCB-854] BootListener support load by not only spring bean, but also SPI 3c7f128 is described below commit 3c7f128c9e50239398847126e7857a8db98d85b4 Author: wujimin AuthorDate: Mon Aug 20 10:51:27 2018 +0800 [SCB-854] BootListener support load by not only spring bean, but also SPI --- .../org/apache/servicecomb/core/BootListener.java | 4 .../java/org/apache/servicecomb/core/SCBEngine.java | 12 ++-- .../org/apache/servicecomb/core/TestSCBEngine.java | 21 + 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/servicecomb/core/BootListener.java b/core/src/main/java/org/apache/servicecomb/core/BootListener.java index b3b8755..848ccdc 100644 --- a/core/src/main/java/org/apache/servicecomb/core/BootListener.java +++ b/core/src/main/java/org/apache/servicecomb/core/BootListener.java @@ -45,5 +45,9 @@ public interface BootListener { } } + default int getOrder() { +return 0; + } + void onBootEvent(BootEvent event); } diff --git a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java index 1bc46c9..dcd877f 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -16,7 +16,10 @@ */ package org.apache.servicecomb.core; +import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; +import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -36,6 +39,7 @@ import org.apache.servicecomb.core.provider.consumer.ReferenceConfig; import org.apache.servicecomb.core.provider.producer.ProducerProviderManager; import org.apache.servicecomb.core.transport.TransportManager; import org.apache.servicecomb.foundation.common.event.EventManager; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask; @@ -70,7 +74,6 @@ public class SCBEngine { private volatile SCBStatus status = SCBStatus.DOWN; - public void setStatus(SCBStatus status) { this.status = status; } @@ -115,7 +118,12 @@ public class SCBEngine { } public void setBootListenerList(Collection bootListenerList) { -this.bootListenerList = bootListenerList; +List tmp = new ArrayList<>(); +tmp.addAll(bootListenerList); +tmp.addAll(SPIServiceUtils.getOrLoadSortedService(BootListener.class)); +tmp.sort(Comparator.comparingInt(BootListener::getOrder)); + +this.bootListenerList = tmp; } protected void triggerEvent(EventType eventType) { diff --git a/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java b/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java index 177a46b..ea6371b 100644 --- a/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java +++ b/core/src/test/java/org/apache/servicecomb/core/TestSCBEngine.java @@ -18,6 +18,7 @@ package org.apache.servicecomb.core; import java.util.ArrayList; +import java.util.Arrays; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.servicecomb.config.ConfigUtil; @@ -26,6 +27,7 @@ import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager; import org.apache.servicecomb.core.provider.consumer.ReferenceConfig; import org.apache.servicecomb.core.provider.producer.ProducerProviderManager; import org.apache.servicecomb.core.transport.TransportManager; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.consumer.AppManager; @@ -134,4 +136,23 @@ public class TestSCBEngine { .is("InvocationException: code=503;msg=CommonExceptionData [message=The request is rejected. Cannot process the request due to STATUS = DOWN]")); engine.getReferenceConfigForInvoke(null); } + + @Test + public void setBootListenerList(@Mocked BootListener beanListener, @Mocked BootListener spiListener) { +new Expectations(SPIServiceUtils.class) { + { +beanListener.getOrder(); +result = 1; +spiListener.getOrder(); +result = 0; +SPIServiceUtils.getOrLoadSortedService(BootListener.class); +result = Arrays.asList(spiListener); + } +}; + +SCBEngine engine = new SCBEngine(); +
[GitHub] WillemJiang commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI
WillemJiang commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/878#issuecomment-414513903 I just checked the code, it provides the SPI loading mechanism. Please update the document with some example to show how to use APM with java-chassis. 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 With regards, Apache Git Services
[GitHub] WillemJiang commented on a change in pull request #38: update Packaging dir translation
WillemJiang commented on a change in pull request #38: update Packaging dir translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/38#discussion_r21105 ## File path: java-chassis-reference/en_US/packaging/web-container.md ## @@ -1,20 +1,17 @@ -## 概念阐述 +## Concept Description -如果需要将该微服务加载到web容器中启动运行时,需要新建一个servlet工程包装一下,该servlet工程,根据需要,可以不写或写少量的引导代码即可。 +If you need to load the microservice into the web container to start the runtime, you need to create a new servlet project wrapper, the servlet project, you can not write or write a small amount of boot code as needed. Review comment: 最后一句太硬了, 建议改成 you just need write few lines of code. 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 With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)"
WillemJiang closed pull request #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)" URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/879 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/handlers/handler-tracing-zipkin/pom.xml b/handlers/handler-tracing-zipkin/pom.xml index 49274c688..5077806ae 100644 --- a/handlers/handler-tracing-zipkin/pom.xml +++ b/handlers/handler-tracing-zipkin/pom.xml @@ -59,10 +59,9 @@ brave-context-log4j12 - io.zipkin.java zipkin - test + compile diff --git a/java-chassis-distribution/src/release/LICENSE b/java-chassis-distribution/src/release/LICENSE index d241e547d..c9430575f 100644 --- a/java-chassis-distribution/src/release/LICENSE +++ b/java-chassis-distribution/src/release/LICENSE @@ -456,5 +456,6 @@ Woodstox (https://github.com/FasterXML/woodstox) com.fasterxml.woodstox:woodstox Zipkin Reporter Spring Factory Beans (https://github.com/openzipkin/zipkin-reporter-java/zipkin-reporter-spring-beans) io.zipkin.reporter2:zipkin-reporter-spring-beans:jar:2.2.2 Zipkin Reporter: Core (https://github.com/openzipkin/zipkin-reporter-java/zipkin-reporter) io.zipkin.reporter2:zipkin-reporter:jar:2.5.0 Zipkin Sender: OkHttp 3 (https://github.com/openzipkin/zipkin-reporter-java/zipkin-sender-okhttp3) io.zipkin.reporter2:zipkin-sender-okhttp3:jar:2.2.2 -Zipkin v2 (https://github.com/openzipkin/zipkin/zipkin) io.zipkin.zipkin2:zipkin:jar:2.4.2 +Zipkin v1 (https://github.com/openzipkin/zipkin/) io.zipkin.java:zipkin:jar:2.4.2 +Zipkin v2 (https://github.com/openzipkin/zipkin/) io.zipkin.zipkin2:zipkin:jar:2.4.2 zuul-core (https://github.com/Netflix/zuul) com.netflix.zuul:zuul-core:jar:1.3.0 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 With regards, Apache Git Services
[incubator-servicecomb-java-chassis] branch master updated: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)"
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git The following commit(s) were added to refs/heads/master by this push: new e6aaeeb [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)" e6aaeeb is described below commit e6aaeeb8f824266b6b33f6e61f340c275f26c2c3 Author: wujimin AuthorDate: Mon Aug 20 22:49:06 2018 +0800 [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)" --- handlers/handler-tracing-zipkin/pom.xml | 3 +-- java-chassis-distribution/src/release/LICENSE | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/handler-tracing-zipkin/pom.xml b/handlers/handler-tracing-zipkin/pom.xml index 49274c6..5077806 100644 --- a/handlers/handler-tracing-zipkin/pom.xml +++ b/handlers/handler-tracing-zipkin/pom.xml @@ -59,10 +59,9 @@ brave-context-log4j12 - io.zipkin.java zipkin - test + compile diff --git a/java-chassis-distribution/src/release/LICENSE b/java-chassis-distribution/src/release/LICENSE index d241e54..c943057 100644 --- a/java-chassis-distribution/src/release/LICENSE +++ b/java-chassis-distribution/src/release/LICENSE @@ -456,5 +456,6 @@ Woodstox (https://github.com/FasterXML/woodstox) com.fasterxml.woodstox:woodstox Zipkin Reporter Spring Factory Beans (https://github.com/openzipkin/zipkin-reporter-java/zipkin-reporter-spring-beans) io.zipkin.reporter2:zipkin-reporter-spring-beans:jar:2.2.2 Zipkin Reporter: Core (https://github.com/openzipkin/zipkin-reporter-java/zipkin-reporter) io.zipkin.reporter2:zipkin-reporter:jar:2.5.0 Zipkin Sender: OkHttp 3 (https://github.com/openzipkin/zipkin-reporter-java/zipkin-sender-okhttp3) io.zipkin.reporter2:zipkin-sender-okhttp3:jar:2.2.2 -Zipkin v2 (https://github.com/openzipkin/zipkin/zipkin) io.zipkin.zipkin2:zipkin:jar:2.4.2 +Zipkin v1 (https://github.com/openzipkin/zipkin/) io.zipkin.java:zipkin:jar:2.4.2 +Zipkin v2 (https://github.com/openzipkin/zipkin/) io.zipkin.zipkin2:zipkin:jar:2.4.2 zuul-core (https://github.com/Netflix/zuul) com.netflix.zuul:zuul-core:jar:1.3.0
[GitHub] coveralls commented on issue #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)"
coveralls commented on issue #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)" URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/879#issuecomment-414367737 [![Coverage Status](https://coveralls.io/builds/18571609/badge)](https://coveralls.io/builds/18571609) Coverage remained the same at 86.202% when pulling **81758bcb2556b93b417bd0a9eade1c80f999c74d on wujimin:fix-zipkin-dependency** into **865f1a9204d0f1369ca65ce2c983ee81213ff392 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 With regards, Apache Git Services
[GitHub] coveralls commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI
coveralls commented on issue #878: [SCB-854] BootListener support load by not only spring bean, but also SPI URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/878#issuecomment-414363725 [![Coverage Status](https://coveralls.io/builds/18571195/badge)](https://coveralls.io/builds/18571195) Coverage increased (+0.02%) to 86.223% when pulling **b5f4a0653082879e5ed4a192666e61f489e7a656 on wujimin:BootListener-load-by-SPI** into **865f1a9204d0f1369ca65ce2c983ee81213ff392 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 With regards, Apache Git Services
[GitHub] codecov-io edited a comment on issue #423: SCB-857 Provider rule of consumer can not be removed
codecov-io edited a comment on issue #423: SCB-857 Provider rule of consumer can not be removed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/423#issuecomment-414342799 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=h1) Report > :exclamation: No coverage uploaded for pull request base (`master@9f55487`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit). > The diff coverage is `40%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/graphs/tree.svg?src=pr=GAaF7zrg8R=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=tree) ```diff @@ Coverage Diff@@ ## master#423 +/- ## Coverage ? 68.8% Files ? 139 Lines ? 10779 Branches ? 0 Hits ?7417 Misses?2883 Partials ? 479 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=tree) | Coverage Δ | | |---|---|---| | [pkg/util/util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-cGtnL3V0aWwvdXRpbC5nbw==) | `59.45% <0%> (ø)` | | | [server/core/backend/parser.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9wYXJzZXIuZ28=) | `99.21% <100%> (ø)` | | | [server/service/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZGVwZW5kZW5jeS5nbw==) | `73.17% <100%> (ø)` | | | [server/core/key\_generator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL2NvcmUva2V5X2dlbmVyYXRvci5nbw==) | `14.28% <100%> (ø)` | | | [server/service/event/dependency\_event\_handler.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZXZlbnQvZGVwZW5kZW5jeV9ldmVudF9oYW5kbGVyLmdv) | `15.31% <21.87%> (ø)` | | | [server/service/util/dependency\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5X3V0aWwuZ28=) | `44.47% <25.35%> (ø)` | | | [server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv) | `37.2% <75%> (ø)` | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?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/423?src=pr=footer). Last update [9f55487...fd6a564](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #422: No 1.0.0 release tag in Docker hub.
little-cui commented on issue #422: No 1.0.0 release tag in Docker hub. URL: https://github.com/apache/incubator-servicecomb-service-center/issues/422#issuecomment-414344489 #277 the same issue 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 With regards, Apache Git Services
[GitHub] wujimin opened a new pull request #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)"
wujimin opened a new pull request #879: [SCB-810] fix compile error for eclipse "Photon Release (4.8.0)" URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/879 parent class brave.http.HttpClientAdapter of ConsumerInvocationAdapter and ProviderInvocationAdapter, depend both zipkin1 and zipkin2 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #4: How about to change the log module to logus or other opensource project?
little-cui commented on issue #4: How about to change the log module to logus or other opensource project? URL: https://github.com/apache/incubator-servicecomb-service-center/issues/4#issuecomment-414343291 Done! 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #416: SCB-848 Uses zap to replace the paas-lager
little-cui commented on issue #416: SCB-848 Uses zap to replace the paas-lager URL: https://github.com/apache/incubator-servicecomb-service-center/pull/416#issuecomment-414343199 #4 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 With regards, Apache Git Services
[GitHub] little-cui closed issue #4: How about to change the log module to logus or other opensource project?
little-cui closed issue #4: How about to change the log module to logus or other opensource project? URL: https://github.com/apache/incubator-servicecomb-service-center/issues/4 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 With regards, Apache Git Services
[GitHub] codecov-io commented on issue #423: SCB-857 Provider rule of consumer can not be removed
codecov-io commented on issue #423: SCB-857 Provider rule of consumer can not be removed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/423#issuecomment-414342799 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=h1) Report > :exclamation: No coverage uploaded for pull request base (`master@9f55487`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit). > The diff coverage is `40%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/graphs/tree.svg?width=650=150=pr=GAaF7zrg8R)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=tree) ```diff @@Coverage Diff@@ ## master #423 +/- ## = Coverage ? 68.83% = Files ? 139 Lines ?10779 Branches ?0 = Hits ? 7420 Misses? 2881 Partials ? 478 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?src=pr=tree) | Coverage Δ | | |---|---|---| | [pkg/util/util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-cGtnL3V0aWwvdXRpbC5nbw==) | `59.45% <0%> (ø)` | | | [server/core/key\_generator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL2NvcmUva2V5X2dlbmVyYXRvci5nbw==) | `14.28% <100%> (ø)` | | | [server/core/backend/parser.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9wYXJzZXIuZ28=) | `99.21% <100%> (ø)` | | | [server/service/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZGVwZW5kZW5jeS5nbw==) | `73.17% <100%> (ø)` | | | [server/service/event/dependency\_event\_handler.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvZXZlbnQvZGVwZW5kZW5jeV9ldmVudF9oYW5kbGVyLmdv) | `15.31% <21.87%> (ø)` | | | [server/service/util/dependency\_util.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5X3V0aWwuZ28=) | `44.47% <25.35%> (ø)` | | | [server/service/util/dependency.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdXRpbC9kZXBlbmRlbmN5Lmdv) | `37.2% <75%> (ø)` | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?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/423?src=pr=footer). Last update [9f55487...2310f1d](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/423?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 With regards, Apache Git Services
[GitHub] little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败
little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/176#issuecomment-414341542 Hi, @zhuhoudong , this issue had been fixed in release 1.0.0, and you can view the [doc](https://github.com/apache/incubator-servicecomb-service-center/blob/master/docs/sc-cluster.md) for help. 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #329: 建议新增mac版的release
little-cui commented on issue #329: 建议新增mac版的release URL: https://github.com/apache/incubator-servicecomb-service-center/issues/329#issuecomment-414342589 Done! 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 With regards, Apache Git Services
[GitHub] little-cui closed issue #329: 建议新增mac版的release
little-cui closed issue #329: 建议新增mac版的release URL: https://github.com/apache/incubator-servicecomb-service-center/issues/329 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 With regards, Apache Git Services
[GitHub] little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败
little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/176#issuecomment-414341542 Hi, @zhuhoudong , this issue had been fixed in release 1.0.0, and you can view the [doc](docs/sc-cluster.md) for help. 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 With regards, Apache Git Services
[GitHub] little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败
little-cui edited a comment on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/176#issuecomment-414341542 Hi, @zhuhoudong , this issue had been fixed in release 1.0.0, and you can view the [doc](/apache/incubator-servicecomb-service-center/docs/sc-cluster.md) for help. 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败
little-cui commented on issue #176: 在华为公有云上部署Frontend Servicecenter 虚机应用失败 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/176#issuecomment-414341542 Hi, @zhuhoudong , this issue had been fixed in release 1.0.0, and you can view the [doc](/docs/sc-cluster.md) for help. 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 With regards, Apache Git Services
[GitHub] little-cui commented on issue #321: runtime: goroutine stack exceeds 1000000000-byte limit
little-cui commented on issue #321: runtime: goroutine stack exceeds 10-byte limit URL: https://github.com/apache/incubator-servicecomb-service-center/issues/321#issuecomment-414340639 Hi, @fallsea, this bug had been fixed in release 1.0.0, now close this issue 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 With regards, Apache Git Services
[GitHub] little-cui closed issue #321: runtime: goroutine stack exceeds 1000000000-byte limit
little-cui closed issue #321: runtime: goroutine stack exceeds 10-byte limit URL: https://github.com/apache/incubator-servicecomb-service-center/issues/321 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 With regards, Apache Git Services
[GitHub] little-cui opened a new pull request #423: SCB-857 Provider rule of consumer can not be removed
little-cui opened a new pull request #423: SCB-857 Provider rule of consumer can not be removed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/423 Follow 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 `go build` `go test` `go fmt` `go vet` 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 With regards, Apache Git Services
[incubator-servicecomb-service-center] branch master updated: Extend the admin dump api (#420)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.git The following commit(s) were added to refs/heads/master by this push: new 9f55487 Extend the admin dump api (#420) 9f55487 is described below commit 9f55487b6ed2a256a5d66fe028c4e986961921e9 Author: little-cui AuthorDate: Mon Aug 20 22:18:15 2018 +0800 Extend the admin dump api (#420) --- pkg/chain/callback.go| 10 +-- pkg/chain/chain.go | 15 -- pkg/chain/chain_test.go | 34 - pkg/chain/invocation.go | 11 +++ server/admin/model/dump.go | 8 +++-- server/admin/service.go | 22 -- server/core/swagger/v4.yaml | 45 server/rest/controller/v4/main_controller.go | 21 ++--- 8 files changed, 105 insertions(+), 61 deletions(-) diff --git a/pkg/chain/callback.go b/pkg/chain/callback.go index e48e16a..27e10c7 100644 --- a/pkg/chain/callback.go +++ b/pkg/chain/callback.go @@ -47,19 +47,11 @@ type Callback struct { func (cb *Callback) Invoke(r Result) { if cb.Async { pool.Do(func(_ context.Context) { - cb.syncInvoke(r) + cb.Func(r) }) return } - cb.syncInvoke(r) -} - -func (cb *Callback) syncInvoke(r Result) { defer log.Recover() - if cb.Func == nil { - log.Errorf(nil, "Callback function is nil. result: %s,", r) - return - } cb.Func(r) } diff --git a/pkg/chain/chain.go b/pkg/chain/chain.go index 51441fe..a1ddd30 100644 --- a/pkg/chain/chain.go +++ b/pkg/chain/chain.go @@ -16,11 +16,6 @@ */ package chain -import ( - errorsEx "github.com/apache/incubator-servicecomb-service-center/pkg/errors" - "github.com/apache/incubator-servicecomb-service-center/pkg/log" -) - type Chain struct { name string handlers []Handler @@ -38,16 +33,6 @@ func (c *Chain) Name() string { } func (c *Chain) syncNext(i *Invocation) { - defer func() { - itf := recover() - if itf == nil { - return - } - log.LogPanic(itf) - - i.Fail(errorsEx.RaiseError(itf)) - }() - if c.currentIndex >= len(c.handlers)-1 { i.Success() return diff --git a/pkg/chain/chain_test.go b/pkg/chain/chain_test.go index d053a81..bb617ed 100644 --- a/pkg/chain/chain_test.go +++ b/pkg/chain/chain_test.go @@ -21,11 +21,12 @@ import ( "errors" "github.com/apache/incubator-servicecomb-service-center/pkg/util" "testing" + "time" ) const ( times = 100 - count = 100 + count = 10 ) func init() { @@ -73,26 +74,13 @@ func BenchmarkChain(b *testing.B) { b.N = times b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - inv := NewInvocation(ctx, NewChain("_bench_chain_", Handlers("_bench_handlers_"))) - inv.Invoke(f) - } - }) - b.ReportAllocs() - // 1006607 ns/op 80 B/op 1 allocs/op -} + for i := 0; i < b.N; i++ { + inv := NewInvocation(ctx, NewChain("_bench_chain_", Handlers("_bench_handlers_"))) + inv.Invoke(f) -func BenchmarkSync(b *testing.B) { - b.N = times - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - syncFunc(0) - } - }) + } b.ReportAllocs() - // 100 46.9 ns/op 0 B/op 0 allocs/op + // 100 735 ns/op 80 B/op 1 allocs/op } type mockHandler struct { @@ -112,7 +100,8 @@ func (h *mockHandler) Handle(i *Invocation) { case 4: i.Next(WithAsyncFunc(func(r Result) { i.WithContext("x", x*x) - i.Context().Value("ch").(chan struct{}) <- struct{}{} + ch, _ := i.Context().Value("ch").(chan struct{}) + ch <- struct{}{} })) case 5: panic(errors.New("error")) @@ -181,7 +170,7 @@ func TestChain_Next(t *testing.T) { t.Fatalf("TestChain_Next") } - x = 4 + x = 4 // async call back ch = NewChain("test", hs) i = NewInvocation(context.Background(), ch) i.WithContext("x", x) @@ -216,7 +205,7 @@ func TestChain_Next(t *testing.T) { } }) - x = 7 + x = 7 // async call back
[GitHub] asifdxtreme closed pull request #420: SCB-797 More information in dump API
asifdxtreme closed pull request #420: SCB-797 More information in dump API URL: https://github.com/apache/incubator-servicecomb-service-center/pull/420 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pkg/chain/callback.go b/pkg/chain/callback.go index e48e16a3..27e10c70 100644 --- a/pkg/chain/callback.go +++ b/pkg/chain/callback.go @@ -47,19 +47,11 @@ type Callback struct { func (cb *Callback) Invoke(r Result) { if cb.Async { pool.Do(func(_ context.Context) { - cb.syncInvoke(r) + cb.Func(r) }) return } - cb.syncInvoke(r) -} - -func (cb *Callback) syncInvoke(r Result) { defer log.Recover() - if cb.Func == nil { - log.Errorf(nil, "Callback function is nil. result: %s,", r) - return - } cb.Func(r) } diff --git a/pkg/chain/chain.go b/pkg/chain/chain.go index 51441feb..a1ddd305 100644 --- a/pkg/chain/chain.go +++ b/pkg/chain/chain.go @@ -16,11 +16,6 @@ */ package chain -import ( - errorsEx "github.com/apache/incubator-servicecomb-service-center/pkg/errors" - "github.com/apache/incubator-servicecomb-service-center/pkg/log" -) - type Chain struct { name string handlers []Handler @@ -38,16 +33,6 @@ func (c *Chain) Name() string { } func (c *Chain) syncNext(i *Invocation) { - defer func() { - itf := recover() - if itf == nil { - return - } - log.LogPanic(itf) - - i.Fail(errorsEx.RaiseError(itf)) - }() - if c.currentIndex >= len(c.handlers)-1 { i.Success() return diff --git a/pkg/chain/chain_test.go b/pkg/chain/chain_test.go index d053a815..bb617ed1 100644 --- a/pkg/chain/chain_test.go +++ b/pkg/chain/chain_test.go @@ -21,11 +21,12 @@ import ( "errors" "github.com/apache/incubator-servicecomb-service-center/pkg/util" "testing" + "time" ) const ( times = 100 - count = 100 + count = 10 ) func init() { @@ -73,26 +74,13 @@ func BenchmarkChain(b *testing.B) { b.N = times b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - inv := NewInvocation(ctx, NewChain("_bench_chain_", Handlers("_bench_handlers_"))) - inv.Invoke(f) - } - }) - b.ReportAllocs() - // 1006607 ns/op 80 B/op 1 allocs/op -} + for i := 0; i < b.N; i++ { + inv := NewInvocation(ctx, NewChain("_bench_chain_", Handlers("_bench_handlers_"))) + inv.Invoke(f) -func BenchmarkSync(b *testing.B) { - b.N = times - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - syncFunc(0) - } - }) + } b.ReportAllocs() - // 100 46.9 ns/op 0 B/op 0 allocs/op + // 100 735 ns/op 80 B/op 1 allocs/op } type mockHandler struct { @@ -112,7 +100,8 @@ func (h *mockHandler) Handle(i *Invocation) { case 4: i.Next(WithAsyncFunc(func(r Result) { i.WithContext("x", x*x) - i.Context().Value("ch").(chan struct{}) <- struct{}{} + ch, _ := i.Context().Value("ch").(chan struct{}) + ch <- struct{}{} })) case 5: panic(errors.New("error")) @@ -181,7 +170,7 @@ func TestChain_Next(t *testing.T) { t.Fatalf("TestChain_Next") } - x = 4 + x = 4 // async call back ch = NewChain("test", hs) i = NewInvocation(context.Background(), ch) i.WithContext("x", x) @@ -216,7 +205,7 @@ func TestChain_Next(t *testing.T) { } }) - x = 7 + x = 7 // async call back ch = NewChain("test", hs) i = NewInvocation(context.Background(), ch) i.WithContext("x", x) @@ -225,4 +214,5 @@ func TestChain_Next(t *testing.T) { t.Fatalf("TestChain_Next") } }) + <-time.After(500 * time.Millisecond) } diff --git a/pkg/chain/invocation.go b/pkg/chain/invocation.go index bb024ca9..457dc36f 100644 --- a/pkg/chain/invocation.go +++ b/pkg/chain/invocation.go @@ -17,6 +17,8 @@ package chain import ( + errorsEx "github.com/apache/incubator-servicecomb-service-center/pkg/errors" +
[incubator-servicecomb-service-center] branch master updated: SCB-851 Can not get providers if consumer have * dependency rule (#421)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.git The following commit(s) were added to refs/heads/master by this push: new 601fe32 SCB-851 Can not get providers if consumer have * dependency rule (#421) 601fe32 is described below commit 601fe32ce50ee65a11ddd071fd6ee33d23a6f576 Author: little-cui AuthorDate: Mon Aug 20 22:16:58 2018 +0800 SCB-851 Can not get providers if consumer have * dependency rule (#421) --- server/service/dependency_test.go | 47 +++-- server/service/util/dependency_query.go | 2 +- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/server/service/dependency_test.go b/server/service/dependency_test.go index b1bfcbc..497b86c 100644 --- a/server/service/dependency_test.go +++ b/server/service/dependency_test.go @@ -32,6 +32,7 @@ var _ = Describe("'Dependency' service", func() { var ( consumerId1 string consumerId2 string + consumerId3 string ) It("should be passed", func() { @@ -50,6 +51,19 @@ var _ = Describe("'Dependency' service", func() { respCreateService, err = serviceResource.Create(getContext(), { Service: { + AppId: "create_dep_group", + ServiceName: "create_dep_consumer_all", + Version: "1.0.0", + Level: "FRONT", + Status: pb.MS_UP, + }, + }) + Expect(err).To(BeNil()) + Expect(respCreateService.Response.Code).To(Equal(pb.Response_SUCCESS)) + consumerId3 = respCreateService.ServiceId + + respCreateService, err = serviceResource.Create(getContext(), { + Service: { Environment: pb.ENV_PROD, AppId: "create_dep_group", ServiceName: "create_dep_consumer", @@ -443,7 +457,11 @@ var _ = Describe("'Dependency' service", func() { respCreateDependency, err = serviceResource.CreateDependenciesForMicroServices(getContext(), { Dependencies: []*pb.ConsumerDependency{ { - Consumer: consumer, + Consumer: { + ServiceName: "create_dep_consumer_all", + AppId: "create_dep_group", + Version: "1.0.0", + }, Providers: []*pb.MicroServiceKey{ { ServiceName: "*", @@ -455,6 +473,31 @@ var _ = Describe("'Dependency' service", func() { Expect(err).To(BeNil()) Expect(respCreateDependency.Response.Code).To(Equal(pb.Response_SUCCESS)) + Expect(deh.Handle()).To(BeNil()) + + respPro, err = serviceResource.GetConsumerDependencies(getContext(), { + ServiceId: consumerId3, + }) + Expect(err).To(BeNil()) + Expect(respPro.Response.Code).To(Equal(pb.Response_SUCCESS)) + Expect(len(respPro.Providers)).ToNot(Equal(0)) + + By("clean all") + respCreateDependency, err = serviceResource.CreateDependenciesForMicroServices(getContext(), { + Dependencies: []*pb.ConsumerDependency{ + { + Consumer: { + ServiceName: "create_dep_consumer_all", + AppId: "create_dep_group", + Version: "1.0.0", + }, +
[GitHub] asifdxtreme closed pull request #421: SCB-851 BUG: Can not get providers if consumer have * dependency rule
asifdxtreme closed pull request #421: SCB-851 BUG: Can not get providers if consumer have * dependency rule URL: https://github.com/apache/incubator-servicecomb-service-center/pull/421 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/server/service/dependency_test.go b/server/service/dependency_test.go index b1bfcbce..497b86c6 100644 --- a/server/service/dependency_test.go +++ b/server/service/dependency_test.go @@ -32,6 +32,7 @@ var _ = Describe("'Dependency' service", func() { var ( consumerId1 string consumerId2 string + consumerId3 string ) It("should be passed", func() { @@ -48,6 +49,19 @@ var _ = Describe("'Dependency' service", func() { Expect(respCreateService.Response.Code).To(Equal(pb.Response_SUCCESS)) consumerId1 = respCreateService.ServiceId + respCreateService, err = serviceResource.Create(getContext(), { + Service: { + AppId: "create_dep_group", + ServiceName: "create_dep_consumer_all", + Version: "1.0.0", + Level: "FRONT", + Status: pb.MS_UP, + }, + }) + Expect(err).To(BeNil()) + Expect(respCreateService.Response.Code).To(Equal(pb.Response_SUCCESS)) + consumerId3 = respCreateService.ServiceId + respCreateService, err = serviceResource.Create(getContext(), { Service: { Environment: pb.ENV_PROD, @@ -443,7 +457,11 @@ var _ = Describe("'Dependency' service", func() { respCreateDependency, err = serviceResource.CreateDependenciesForMicroServices(getContext(), { Dependencies: []*pb.ConsumerDependency{ { - Consumer: consumer, + Consumer: { + ServiceName: "create_dep_consumer_all", + AppId: "create_dep_group", + Version: "1.0.0", + }, Providers: []*pb.MicroServiceKey{ { ServiceName: "*", @@ -455,6 +473,31 @@ var _ = Describe("'Dependency' service", func() { Expect(err).To(BeNil()) Expect(respCreateDependency.Response.Code).To(Equal(pb.Response_SUCCESS)) + Expect(deh.Handle()).To(BeNil()) + + respPro, err = serviceResource.GetConsumerDependencies(getContext(), { + ServiceId: consumerId3, + }) + Expect(err).To(BeNil()) + Expect(respPro.Response.Code).To(Equal(pb.Response_SUCCESS)) + Expect(len(respPro.Providers)).ToNot(Equal(0)) + + By("clean all") + respCreateDependency, err = serviceResource.CreateDependenciesForMicroServices(getContext(), { + Dependencies: []*pb.ConsumerDependency{ + { + Consumer: { + ServiceName: "create_dep_consumer_all", + AppId: "create_dep_group", + Version: "1.0.0", + }, + Providers: nil, + }, + }, + }) + Expect(err).To(BeNil()) +
[incubator-servicecomb-saga] branch master updated: Fix the formate issue README
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git The following commit(s) were added to refs/heads/master by this push: new 13e5646 Fix the formate issue README 13e5646 is described below commit 13e5646a11f75c2c477da12465f074ad4bb1aaad Author: Willem Jiang AuthorDate: Mon Aug 20 19:47:53 2018 +0800 Fix the formate issue README --- README.md| 4 ++-- README_ZH.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 07c3a3d..eb009f4 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ The following diagram shows the relationships among alpha, omega and services. See [Saga Pack Design](docs/design.md) for details. -Please check out Go lang version of Omega here https://github.com/jeremyxu2010/matrix-saga-go -C# version of Omega here https://github.com/OpenSagas-csharp/servicecomb-saga-csharp +* Go lang version of Omega here https://github.com/jeremyxu2010/matrix-saga-go +* C# version of Omega here https://github.com/OpenSagas-csharp/servicecomb-saga-csharp ## Get Started * For ServiceComb Java Chassis application, please see [Booking Demo](saga-demo/saga-servicecomb-demo/README.md) for details. diff --git a/README_ZH.md b/README_ZH.md index c4eb0f2..0531441 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -19,8 +19,8 @@ Saga是由 **alpha** 和 **omega**组成,其中: 详情可浏览[Saga Pack 设计文档](docs/design_zh.md). -Go语言版本Omega 可参见 https://github.com/jeremyxu2010/matrix-saga-go -C#语言版本Omega 可参见 https://github.com/OpenSagas-csharp/servicecomb-saga-csharp +* Go语言版本Omega 可参见 https://github.com/jeremyxu2010/matrix-saga-go +* C#语言版本Omega 可参见 https://github.com/OpenSagas-csharp/servicecomb-saga-csharp ## 快速入门
[incubator-servicecomb-saga] branch master updated: Updated Readme file for the new added Omega plugins
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git The following commit(s) were added to refs/heads/master by this push: new 67f9b95 Updated Readme file for the new added Omega plugins 67f9b95 is described below commit 67f9b95cfce86d5d0ea6cc3bf2c6704740bd1bdc Author: Willem Jiang AuthorDate: Mon Aug 20 19:24:05 2018 +0800 Updated Readme file for the new added Omega plugins --- README.md| 7 +-- README_ZH.md | 8 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 45ee3ef..07c3a3d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,10 @@ Saga is composed of **alpha** and **omega**. The following diagram shows the relationships among alpha, omega and services. ![Saga Pack Architecture](docs/static_files/pack.png) -See [Saga Pack Design](docs/design.md) for details. +See [Saga Pack Design](docs/design.md) for details. + +Please check out Go lang version of Omega here https://github.com/jeremyxu2010/matrix-saga-go +C# version of Omega here https://github.com/OpenSagas-csharp/servicecomb-saga-csharp ## Get Started * For ServiceComb Java Chassis application, please see [Booking Demo](saga-demo/saga-servicecomb-demo/README.md) for details. @@ -50,7 +53,7 @@ How to build and use can refer to [User Guide](docs/user_guide.md). ## Contact Us * [issues](https://issues.apache.org/jira/browse/SCB) -* [gitter](https://gitter.im/ServiceCombUsers/Lobby) +* [gitter](https://gitter.im/ServiceCombUsers/Saga) * mailing list: [subscribe](mailto:dev-subscr...@servicecomb.incubator.apache.org) [view](https://lists.apache.org/list.html?d...@servicecomb.apache.org) ## Contributing diff --git a/README_ZH.md b/README_ZH.md index 5bfc709..c4eb0f2 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -17,7 +17,11 @@ Saga是由 **alpha** 和 **omega**组成,其中: 下图展示了alpha, omega以及微服务三者的关系: ![Saga Pack 架构](docs/static_files/pack.png) -详情可浏览[Saga Pack 设计文档](docs/design_zh.md). +详情可浏览[Saga Pack 设计文档](docs/design_zh.md). + +Go语言版本Omega 可参见 https://github.com/jeremyxu2010/matrix-saga-go +C#语言版本Omega 可参见 https://github.com/OpenSagas-csharp/servicecomb-saga-csharp + ## 快速入门 * Saga在ServiceComb Java Chassis应用可以参考[出行预订](saga-demo/saga-servicecomb-demo/README.md) @@ -52,7 +56,7 @@ JDK9或者JDK10 来编译Saga并运行测试的话,你需要使用 spring-boot ## 联系我们 * [提交issues](https://issues.apache.org/jira/browse/SCB) -* [gitter聊天室](https://gitter.im/ServiceCombUsers/Lobby) +* [gitter聊天室](https://gitter.im/ServiceCombUsers/Saga) * 邮件列表: [订阅](mailto:dev-subscr...@servicecomb.incubator.apache.org) [浏览](https://lists.apache.org/list.html?d...@servicecomb.apache.org) ## 贡献
[incubator-servicecomb-saga] branch SCB-665 updated (c93373d -> 4efa3a9)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git. discard c93373d SCB-817 Updated the pack-contracts protocal for TCC discard 5a52f6e SCB-817 Added TCC events in Omega part (WIP) discard e071a9b SCB-817 Added TCC events in Omega part (WIP) add 8a2bcbe SCB-852 Split akka related code to saga-core-akka add c1f0a10 SCB-852 Fixed the build error by adding saga-core-akka module add 089ffd7 SCB-852 Added the uncommitted pom of saga-core-akka add 7e586b5 SCB-853 Saga-core supports JDK7 now new 5b1ea96 SCB-817 Added TCC events in Omega part (WIP) new 0c16634 SCB-817 Added TCC events in Omega part (WIP) new 277ff27 SCB-817 Updated the pack-contracts protocal for TCC new 29bfbde SCB-817 Added the License header new 4efa3a9 SCB-817 Updated the grpc file of TccEventService This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (c93373d) \ N -- N -- N refs/heads/SCB-665 (4efa3a9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../tcc/TccStartAnnotationProcessor.java | 16 ++ .../saga/omega/transaction/tcc/TccStartAspect.java | 16 ++ .../omega/transaction/tcc/events/TccEndEvent.java | 16 ++ .../transaction/tcc/events/TccStartEvent.java | 16 ++ .../src/main/proto/GrpcTccEvent.proto | 18 +++ pom.xml| 12 + {saga-core => saga-core-akka}/pom.xml | 19 ++- .../saga/core/actors/ActorBasedSaga.java | 2 +- .../saga/core/actors/ActorBasedSagaFactory.java| 0 .../saga/core/actors/CompletionCallbackActor.java | 0 .../saga/core/actors/EventContextImpl.java | 0 .../servicecomb/saga/core/actors/RequestActor.java | 0 .../saga/core/actors/RequestActorBuilder.java | 0 .../saga/core/actors/RequestActorContext.java | 0 .../saga/core/actors/messages/AbortMessage.java| 0 .../core/actors/messages/AbortRecoveryMessage.java | 0 .../core/actors/messages/CompensateMessage.java| 0 .../messages/CompensationRecoveryMessage.java | 0 .../saga/core/actors/messages/FailMessage.java | 0 .../saga/core/actors/messages/Message.java | 0 .../saga/core/actors/messages/TransactMessage.java | 1 + .../messages/TransactionRecoveryMessage.java | 0 .../ActorBasedSagaExecutionComponentTest.java | 2 +- .../core/actors/ActorBasedSagaIntegrationTest.java | 16 +++--- .../core/actors/CompletionCallbackActorTest.java | 4 +- .../saga/core/actors/EventContextImplTest.java | 0 .../saga/core/actors/RequestActorBuilderTest.java | 2 +- .../saga/core/actors/RequestActorTest.java | 0 .../src/test/resources/application.conf| 0 .../src/test}/resources/log4j2.xml | 0 saga-core/pom.xml | 46 +--- .../servicecomb/saga/core/BackwardRecovery.java| 5 ++ .../apache/servicecomb/saga/core/Compensation.java | 32 +-- .../saga/core/CompositeSagaResponse.java | 31 --- .../apache/servicecomb/saga/core/Descriptive.java | 4 +- .../org/apache/servicecomb/saga/core/Fallback.java | 17 +- .../servicecomb/saga/core/ForwardRecovery.java | 5 ++ .../servicecomb/saga/core/GraphBasedSaga.java | 15 +++--- .../saga/core/LoggingRecoveryPolicy.java | 5 ++ .../servicecomb/saga/core/NoOpSagaRequest.java | 6 +++ .../apache/servicecomb/saga/core/Operation.java| 8 +-- .../servicecomb/saga/core/RestOperation.java | 14 +++-- .../apache/servicecomb/saga/core/SagaContext.java | 4 +- .../servicecomb/saga/core/SagaContextImpl.java | 35 +++- .../apache/servicecomb/saga/core/SagaEvent.java| 5 ++ .../apache/servicecomb/saga/core/SagaRequest.java | 6 +-- .../servicecomb/saga/core/SagaTaskFactory.java | 10 ++-- .../apache/servicecomb/saga/core/Transaction.java | 18 +++ .../servicecomb/saga/core/TransactionConsumer.java | 5 ++ .../saga/core/dag/ByLevelTraveller.java| 5 +-
[incubator-servicecomb-saga] 01/05: SCB-817 Added TCC events in Omega part (WIP)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 5b1ea9659b1c37a998450f6b49b59b94921efee9 Author: Willem Jiang AuthorDate: Sun Aug 12 11:16:22 2018 +0800 SCB-817 Added TCC events in Omega part (WIP) --- .../saga/omega/context/annotations/TccStart.java | 15 + .../saga/omega/transaction/annotations/TCC.java| 64 ++ .../saga/omega/transaction/tcc/TccAspect.java | 48 .../saga/omega/transaction/tcc/TccInterceptor.java | 4 ++ .../tcc/TccStartAnnotationProcessor.java | 47 .../saga/omega/transaction/tcc/TccStartAspect.java | 60 .../omega/transaction/tcc/events/CancelEvent.java | 20 +++ .../omega/transaction/tcc/events/ConfirmEvent.java | 20 +++ .../transaction/tcc/events/ParticipateEvent.java | 21 +++ .../tcc/events/TransactionEndEvent.java| 4 ++ .../tcc/events/TransationStartEvent.java | 4 ++ 11 files changed, 307 insertions(+) diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java new file mode 100644 index 000..c9154f9 --- /dev/null +++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java @@ -0,0 +1,15 @@ +package org.apache.servicecomb.saga.omega.context.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Indicates the annotated method will start a TCC . + */ +@Retention(RUNTIME) +@Target(METHOD) +public @interface TccStart { +} diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java new file mode 100644 index 000..a095978 --- /dev/null +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.servicecomb.saga.omega.transaction.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +/** + * Indicates the annotated method will start a sub-transaction. + * A @TCC method should satisfy below requirements: + * + * all parameters are serialized + * is idempotent + * the object instance which @TCC method resides in should be stateless + * + */ +public @interface TCC { + /** + * Confirm method name. + * A confirm method should satisfy below requirements: + * + * has same parameter list as @TCC method's + * all parameters are serialized + * is idempotent + * be in the same class as @TCC method is in + * + * + * @return + */ + String confirmMethod() default ""; + + /** + * Cancel method name. + * A cancel method should satisfy below requirements: + * + * has same parameter list as @TCC method's + * all parameters are serialized + * is idempotent + * be in the same class as @TCC method is in + * + * + * @return + */ + String cancelMethod() default ""; + +} diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java new file mode 100644 index 000..173cb78 --- /dev/null +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java @@ -0,0 +1,48 @@ +package org.apache.servicecomb.saga.omega.transaction.tcc; + +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Method; +
[incubator-servicecomb-saga] 04/05: SCB-817 Added the License header
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 29bfbdeef98c41559d16f565095d85951922cd21 Author: Willem Jiang AuthorDate: Mon Aug 20 19:06:20 2018 +0800 SCB-817 Added the License header --- .../transaction/tcc/TccStartAnnotationProcessor.java | 16 .../saga/omega/transaction/tcc/TccStartAspect.java | 16 .../saga/omega/transaction/tcc/events/TccEndEvent.java | 16 .../saga/omega/transaction/tcc/events/TccStartEvent.java | 16 4 files changed, 64 insertions(+) diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAnnotationProcessor.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAnnotationProcessor.java index b38d876..b93373f 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAnnotationProcessor.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAnnotationProcessor.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.servicecomb.saga.omega.transaction.tcc; import javax.transaction.TransactionalException; diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAspect.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAspect.java index c8b7936..90728e3 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAspect.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccStartAspect.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.servicecomb.saga.omega.transaction.tcc; import java.lang.invoke.MethodHandles; diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java index 1022aee..541489f 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/events/TccEndEvent.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package
[incubator-servicecomb-saga] 05/05: SCB-817 Updated the grpc file of TccEventService
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 4efa3a96c3bb0923c9d6db008d4a9e5cdb83da4f Author: Willem Jiang AuthorDate: Mon Aug 20 19:10:07 2018 +0800 SCB-817 Updated the grpc file of TccEventService --- .../src/main/proto/GrpcTccEvent.proto | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto index 1eba5e5..9e1752f 100644 --- a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto +++ b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto @@ -24,23 +24,23 @@ option java_outer_classname = "TccEventProto"; import "GrpcCommon.proto"; service TccEventService { - rpc participate(GrpcParticipateEvent) returns (GrpcAck) {} - rpc OnConnected (GrpcServiceConfig) returns (stream GrpcCordinateCommand) { + rpc OnConnected (GrpcServiceConfig) returns (stream GrpcTccCordinateCommand) { } - rpc OnTransactionStarted (GrpcTransactionStartedEvent) returns (GrpcAck) {} - rpc OnTransactionEnded (GrpcTransactionEndedEvent) returns (GrpcAck) {} + rpc participate(GrpcTccParticipateEvent) returns (GrpcAck) {} + rpc OnTccTransactionStarted (GrpcTccTransactionStartedEvent) returns (GrpcAck) {} + rpc OnTccTransactionEnded (GrpcTccTransactionEndedEvent) returns (GrpcAck) {} rpc OnDisconnected (GrpcServiceConfig) returns (GrpcAck) { } } -message GrpcTransactionStartedEvent { +message GrpcTccTransactionStartedEvent { int64 timestamp = 1; string globalTxId = 2; string localTxId = 3; string parentTxId = 4; } -message GrpcParticipateEvent { +message GrpcTccParticipateEvent { int64 timestamp = 1; string globalTxId = 2; string localTxId = 3; @@ -49,7 +49,7 @@ message GrpcParticipateEvent { string cancelMethod = 7; } -message GrpcTransactionEndedEvent { +message GrpcTccTransactionEndedEvent { int64 timestamp = 1; string globalTxId = 2; string localTxId = 3; @@ -57,10 +57,10 @@ message GrpcTransactionEndedEvent { string type = 5; } -message GrpcCordinateCommand { +message GrpcTccCordinateCommand { string globalTxId = 1; string localTxId = 2; string parentTxId = 3; - string type = 4; + string method = 4; }
[incubator-servicecomb-saga] 02/05: SCB-817 Added TCC events in Omega part (WIP)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 0c1663454afb885308c0b035a918589204c64256 Author: Willem Jiang AuthorDate: Thu Aug 16 10:44:06 2018 +0800 SCB-817 Added TCC events in Omega part (WIP) --- .../saga/omega/context/annotations/TccStart.java | 7 +++ .../annotations/{TCC.java => Participate.java} | 14 ++--- .../saga/omega/transaction/tcc/TccAspect.java | 48 --- .../saga/omega/transaction/tcc/TccInterceptor.java | 4 -- .../transaction/tcc/TccParticipatorAspect.java | 68 ++ .../tcc/TccStartAnnotationProcessor.java | 6 +- .../saga/omega/transaction/tcc/TccStartAspect.java | 7 ++- .../omega/transaction/tcc/events/CancelEvent.java | 20 --- .../omega/transaction/tcc/events/ConfirmEvent.java | 20 --- .../omega/transaction/tcc/events/TccEndEvent.java | 14 + .../transaction/tcc/events/TccStartEvent.java | 25 .../tcc/events/TransactionEndEvent.java| 4 -- .../tcc/events/TransationStartEvent.java | 4 -- 13 files changed, 129 insertions(+), 112 deletions(-) diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java index c9154f9..6c8afd2 100644 --- a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java +++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/annotations/TccStart.java @@ -12,4 +12,11 @@ import java.lang.annotation.Target; @Retention(RUNTIME) @Target(METHOD) public @interface TccStart { + /** + * TCC timeout, in seconds. + * Default value is 0, which means never timeout. + * + * @return + */ + int timeout() default 0; } diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Participate.java similarity index 79% rename from omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java rename to omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Participate.java index a095978..8351076 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/TCC.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/annotations/Participate.java @@ -25,22 +25,22 @@ import java.lang.annotation.Target; @Target({ElementType.METHOD}) /** * Indicates the annotated method will start a sub-transaction. - * A @TCC method should satisfy below requirements: + * A @Participate method should satisfy below requirements: * * all parameters are serialized * is idempotent - * the object instance which @TCC method resides in should be stateless + * the object instance which @Participate method resides in should be stateless * */ -public @interface TCC { +public @interface Participate { /** * Confirm method name. * A confirm method should satisfy below requirements: * - * has same parameter list as @TCC method's + * has same parameter list as @Participate method's * all parameters are serialized * is idempotent - * be in the same class as @TCC method is in + * be in the same class as @Participate method is in * * * @return @@ -51,10 +51,10 @@ public @interface TCC { * Cancel method name. * A cancel method should satisfy below requirements: * - * has same parameter list as @TCC method's + * has same parameter list as @Participate method's * all parameters are serialized * is idempotent - * be in the same class as @TCC method is in + * be in the same class as @Participate method is in * * * @return diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java deleted file mode 100644 index 173cb78..000 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/tcc/TccAspect.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.apache.servicecomb.saga.omega.transaction.tcc; - -import java.lang.invoke.MethodHandles; -import java.lang.reflect.Method; - -import org.apache.servicecomb.saga.omega.context.OmegaContext; -import org.apache.servicecomb.saga.omega.transaction.CompensableInterceptor; -import org.apache.servicecomb.saga.omega.transaction.MessageSender; -import org.apache.servicecomb.saga.omega.transaction.RecoveryPolicy; -import
[incubator-servicecomb-saga] 03/05: SCB-817 Updated the pack-contracts protocal for TCC
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch SCB-665 in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git commit 277ff27ef353f650a1f543b8fd77f64ac0c035eb Author: Willem Jiang AuthorDate: Thu Aug 16 10:52:19 2018 +0800 SCB-817 Updated the pack-contracts protocal for TCC --- .../proto/{GrpcTxEvent.proto => GrpcCommon.proto} | 33 + .../{GrpcTxEvent.proto => GrpcTccEvent.proto} | 43 -- .../src/main/proto/GrpcTxEvent.proto | 11 +- 3 files changed, 26 insertions(+), 61 deletions(-) diff --git a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcCommon.proto similarity index 58% copy from pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto copy to pack-contracts/pack-contract-grpc/src/main/proto/GrpcCommon.proto index d2c6f77..40a8db7 100644 --- a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto +++ b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcCommon.proto @@ -19,15 +19,8 @@ syntax = "proto3"; option java_multiple_files = true; option java_package = "org.apache.servicecomb.saga.pack.contract.grpc"; -option java_outer_classname = "TxEventProto"; -service TxEventService { - rpc OnConnected (GrpcServiceConfig) returns (stream GrpcCompensateCommand) { - } - rpc OnTxEvent (GrpcTxEvent) returns (GrpcAck) {} - rpc OnDisconnected (GrpcServiceConfig) returns (GrpcAck) { - } -} +// Define the common structs which could be use for TccEventService and SagaEventService message GrpcServiceConfig { string serviceName = 1; @@ -37,27 +30,3 @@ message GrpcServiceConfig { message GrpcAck { bool aborted = 1; } - -message GrpcTxEvent { - int64 timestamp = 1; - string globalTxId = 2; - string localTxId = 3; - string parentTxId = 4; - string type = 5; - string compensationMethod = 6; - bytes payloads = 7; - string serviceName = 8; - string instanceId = 9; - int32 timeout = 10; - int32 retries = 11; - string retryMethod = 12; -} - -message GrpcCompensateCommand { - string globalTxId = 1; - string localTxId = 2; - string parentTxId = 3; - string compensationMethod = 4; - bytes payloads = 5; -} - diff --git a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto similarity index 60% copy from pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto copy to pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto index d2c6f77..1eba5e5 100644 --- a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto +++ b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTccEvent.proto @@ -19,45 +19,48 @@ syntax = "proto3"; option java_multiple_files = true; option java_package = "org.apache.servicecomb.saga.pack.contract.grpc"; -option java_outer_classname = "TxEventProto"; +option java_outer_classname = "TccEventProto"; -service TxEventService { - rpc OnConnected (GrpcServiceConfig) returns (stream GrpcCompensateCommand) { +import "GrpcCommon.proto"; + +service TccEventService { + rpc participate(GrpcParticipateEvent) returns (GrpcAck) {} + rpc OnConnected (GrpcServiceConfig) returns (stream GrpcCordinateCommand) { } - rpc OnTxEvent (GrpcTxEvent) returns (GrpcAck) {} + rpc OnTransactionStarted (GrpcTransactionStartedEvent) returns (GrpcAck) {} + rpc OnTransactionEnded (GrpcTransactionEndedEvent) returns (GrpcAck) {} rpc OnDisconnected (GrpcServiceConfig) returns (GrpcAck) { } } -message GrpcServiceConfig { - string serviceName = 1; - string instanceId = 2; +message GrpcTransactionStartedEvent { + int64 timestamp = 1; + string globalTxId = 2; + string localTxId = 3; + string parentTxId = 4; } -message GrpcAck { - bool aborted = 1; +message GrpcParticipateEvent { + int64 timestamp = 1; + string globalTxId = 2; + string localTxId = 3; + string parentTxId = 4; + string confirmMethod = 6; + string cancelMethod = 7; } -message GrpcTxEvent { +message GrpcTransactionEndedEvent { int64 timestamp = 1; string globalTxId = 2; string localTxId = 3; string parentTxId = 4; string type = 5; - string compensationMethod = 6; - bytes payloads = 7; - string serviceName = 8; - string instanceId = 9; - int32 timeout = 10; - int32 retries = 11; - string retryMethod = 12; } -message GrpcCompensateCommand { +message GrpcCordinateCommand { string globalTxId = 1; string localTxId = 2; string parentTxId = 3; - string compensationMethod = 4; - bytes payloads = 5; + string type = 4; } diff --git a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto b/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto index d2c6f77..f037b4f 100644 --- a/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto +++
[incubator-servicecomb-website] 01/02: Merge branch 'master' into asf-site
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git commit 66bcb89a8c00dddb15d7657ede356fc763aab02b Merge: 44bb2b9 830e23d Author: Willem Jiang AuthorDate: Mon Aug 20 18:03:07 2018 +0800 Merge branch 'master' into asf-site _pages/home.md | 18 ++ _posts/2018-8-20-release-note-1-0-0.md | 102 + 2 files changed, 108 insertions(+), 12 deletions(-)
[incubator-servicecomb-website] branch asf-site updated (44bb2b9 -> 2cd7cc6)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git. from 44bb2b9 Publish the website add 830e23d add english version release note of 1.0.0 new 66bcb89 Merge branch 'master' into asf-site new 2cd7cc6 Publish the website The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: _pages/home.md | 18 +- _posts/2018-8-20-release-note-1-0-0.md | 102 + .../docs/apache-servicecomb-day-slides/index.html | 22 +- .../apache-servicecomb-incubating-day/index.html | 22 +- content/cn/docs/autoscale-on-company/index.html| 22 +- .../index.html | 22 +- content/cn/docs/communication-btw-sc-ms/index.html | 22 +- content/cn/docs/company-on-kubernetes/index.html | 22 +- .../cn/docs/config_center_integration/index.html | 22 +- content/cn/docs/consul-servicemesh.html| 22 +- .../index.html | 22 +- content/cn/docs/distributed_saga_1/index.html | 22 +- content/cn/docs/distributed_saga_2/index.html | 22 +- content/cn/docs/distributed_saga_3/index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- content/cn/docs/go-to-cloud/index.html | 22 +- .../index.html | 22 +- .../docs/how-to-reform-a-legacy-system/index.html | 22 +- content/cn/docs/jira_beginner_guide/index.html | 22 +- content/cn/docs/join_the_community/index.html | 22 +- content/cn/docs/linuxcon-workshop-demo/index.html | 22 +- .../cn/docs/maven_dependency_management/index.html | 22 +- content/cn/docs/open-design/index.html | 22 +- .../index.html | 22 +- content/cn/docs/release_note_1_0_0.html| 25 +- content/cn/docs/saga_pack_design/index.html| 22 +- content/cn/docs/saga_with_cucumber/index.html | 22 +- .../seckill-development-journey-part-I/index.html | 22 +- .../seckill-development-journey-part-II/index.html | 22 +- .../index.html | 22 +- .../index.html | 22 +- .../cn/docs/tracing-with-servicecomb/index.html| 22 +- .../index.html | 22 +- .../apache-servicecomb-incubating-day/index.html | 22 +- content/docs/autoscale-on-company/index.html | 22 +- content/docs/communication-btw-sc-ms/index.html| 22 +- content/docs/company-on-kubernetes/index.html | 22 +- content/docs/distributed_saga_1/index.html | 22 +- content/docs/distributed_saga_2/index.html | 22 +- content/docs/distributed_saga_3/index.html | 22 +- content/docs/go-to-cloud/index.html| 22 +- .../docs/how-to-reform-a-legacy-system/index.html | 22 +- content/docs/howto-upgrade-topzipkin2/index.html | 22 +- content/docs/linuxcon-workshop-demo/index.html | 22 +- .../index.html | 203 +++--- .../seckill-development-journey-part-I/index.html | 22 +- .../seckill-development-journey-part-II/index.html | 22 +- .../index.html | 22 +- content/docs/service-center-ui/index.html | 22 +- .../service-registry-refactor-proposal/index.html | 22 +- .../index.html | 22 +- content/docs/tracing-with-servicecomb/index.html | 22 +- content/feed.xml | 445 ++--- content/index.html | 4 +- content/sitemap.xml| 4 + content/sitemap/index.html | 2 + content/year-archive/index.html| 168 60 files changed, 1119 insertions(+), 974 deletions(-) mode change 100644 => 100755 _pages/home.md create mode 100755 _posts/2018-8-20-release-note-1-0-0.md copy content/docs/{apache-servicecomb-incubating-day-report => release-note-1-0-0}/index.html (62%)
[GitHub] WillemJiang closed pull request #132: add english version release note of v1.0.0
WillemJiang closed pull request #132: add english version release note of v1.0.0 URL: https://github.com/apache/incubator-servicecomb-website/pull/132 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/_pages/home.md b/_pages/home.md old mode 100644 new mode 100755 index 23669e37..476a3457 --- a/_pages/home.md +++ b/_pages/home.md @@ -20,33 +20,27 @@ intro: Latest News - -Microservice Meetup: Apache ServiceComb (incubating) Day slides + +[Milestone] Apache ServiceComb (incubating) Release Version 1.0.0 -ServiceComb announces it's first Apache Incubating Release to the community. +Microservice Meetup: Apache ServiceComb (incubating) Day slides ServiceComb now provides data consistency solutions(Saga) in microservice application. - -Join us at Gitter - - -Java-Chassis releases a new version 1.0.0 - - -Service-Center releases a new version 1.0.0 - Saga releases a new version 0.2.0 Service-Center Frontend can be used to test microservices schema directly from web. + +Join us at Gitter + " diff --git a/_posts/2018-8-20-release-note-1-0-0.md b/_posts/2018-8-20-release-note-1-0-0.md new file mode 100755 index ..c5bbe21f --- /dev/null +++ b/_posts/2018-8-20-release-note-1-0-0.md @@ -0,0 +1,102 @@ +--- +title: "[Milestone] Apache ServiceComb (incubating) Release Version 1.0.0" +lang: en +ref: release-note-1-0-0 +permalink: /docs/release-note-1-0-0/ +excerpt: "Apache ServiceComb (incubating) enters new stage" +last_modified_at: 2018-06-14T10:26:28+08:00 +author: Wang Kirin +tags: [microservice, version, release] +redirect_from: + - /theme-setup/ +--- + + + Recently, the Apache Foundation Incubation Project - Apache ServiceComb (incubating) officially released its 1.0.0 version through community voting. The release this time includes Apache ServiceComb Java-Chassis (hereinafter referred to as Java-chassis) and Apache ServiceComb ServiceCenter (hereinafter referred to as ServiceCenter). + + ServiceComb has entered the Apache Foundation since December 2017, and version 1.0.0-m1 released in March 2018 , 1.0.0-m2 in June 2018 . Now in August 2018, the milestone of release -1.0.0 was completed. + + At present, 10+ companies have used ServiceComb for commercial use, the ServiceComb team has already participated in 10+ Meetups to give a speech. Besides, the ServiceComb community also held 3 Meetups. The release of version 1.0.0 this time means that the ServiceComb version has officially entered a stable state on the premise of meeting the requirements of the Apache Software Foundation. The main new features and enhancements of ServiceComb Java-chassis and Service-center after entering the Apache Foundation incubation are as follows: + + +## Java-chassis + +- New Metrics module; Added a large number of monitoring indicators; Support Prometheus integration +- Re-org the configuration center, support docking Ctrip Apollo as a configuration center, and easily extend the docking of other three-party configuration centers +- The POJO programming model allows users to use CompletableFuture asynchronous programming +- The POJO programming model allows users to use Object and Generic types as invoke parameters +- Upgrade Zipkin to Zipkin2, and support both v1 and v2 versions of Zipkin server +- Micro-service communication provides file stream capability and supports multimedia scenes such as music and pictures +- Added support for API level QPS control based on service level QPS control; + - Now we support using `servicecomb.flowcontrol.Consumer.qps.limit.[ServiceName].[Schema].[operation]` to config the API level QPS control +- Added `scaffold` and [start.servicecomb.io](http://start.servicecomb.io) to allow users quickly build projects and provide complete out-of-the-box capabilities + - Now create a ServiceComb microservice can be quickly built by Apache Maven Archetype. For more details, please refer to [ServiceComb Java Chassis Archetypes](https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/archetypes/README.md) , or you can directly access [start.servicecomb.io](http://start.servicecomb.io) to use the `SPRING INITIALIZR UI` intergated by ServiceComb . + +- Added a demonstration of how to build a ServiceComb project using `Gradle` +- We added the Gradle configuration to the [BMI](https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi) project + +- Asynchronous programming model supports `AsycRestTemplate` + +- Added support for the `http/2` protocol + +- Implemented error injection interface that allows constructing an
[incubator-servicecomb-website] branch master updated: add english version release note of 1.0.0
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git The following commit(s) were added to refs/heads/master by this push: new 830e23d add english version release note of 1.0.0 830e23d is described below commit 830e23dcf95090cb4c677f19f7ca94e2531d616c Author: Wang Kirin AuthorDate: Mon Aug 20 17:37:35 2018 +0800 add english version release note of 1.0.0 --- _pages/home.md | 18 ++ _posts/2018-8-20-release-note-1-0-0.md | 102 + 2 files changed, 108 insertions(+), 12 deletions(-) diff --git a/_pages/home.md b/_pages/home.md old mode 100644 new mode 100755 index 23669e3..476a345 --- a/_pages/home.md +++ b/_pages/home.md @@ -20,33 +20,27 @@ intro: Latest News - -Microservice Meetup: Apache ServiceComb (incubating) Day slides + +[Milestone] Apache ServiceComb (incubating) Release Version 1.0.0 -ServiceComb announces it's first Apache Incubating Release to the community. +Microservice Meetup: Apache ServiceComb (incubating) Day slides ServiceComb now provides data consistency solutions(Saga) in microservice application. - -Join us at Gitter - -Java-Chassis releases a new version 1.0.0 - - -Service-Center releases a new version 1.0.0 - - Saga releases a new version 0.2.0 Service-Center Frontend can be used to test microservices schema directly from web. + +Join us at Gitter + " diff --git a/_posts/2018-8-20-release-note-1-0-0.md b/_posts/2018-8-20-release-note-1-0-0.md new file mode 100755 index 000..c5bbe21 --- /dev/null +++ b/_posts/2018-8-20-release-note-1-0-0.md @@ -0,0 +1,102 @@ +--- +title: "[Milestone] Apache ServiceComb (incubating) Release Version 1.0.0" +lang: en +ref: release-note-1-0-0 +permalink: /docs/release-note-1-0-0/ +excerpt: "Apache ServiceComb (incubating) enters new stage" +last_modified_at: 2018-06-14T10:26:28+08:00 +author: Wang Kirin +tags: [microservice, version, release] +redirect_from: + - /theme-setup/ +--- + + + Recently, the Apache Foundation Incubation Project - Apache ServiceComb (incubating) officially released its 1.0.0 version through community voting. The release this time includes Apache ServiceComb Java-Chassis (hereinafter referred to as Java-chassis) and Apache ServiceComb ServiceCenter (hereinafter referred to as ServiceCenter). + + ServiceComb has entered the Apache Foundation since December 2017, and version 1.0.0-m1 released in March 2018 , 1.0.0-m2 in June 2018 . Now in August 2018, the milestone of release -1.0.0 was completed. + + At present, 10+ companies have used ServiceComb for commercial use, the ServiceComb team has already participated in 10+ Meetups to give a speech. Besides, the ServiceComb community also held 3 Meetups. The release of version 1.0.0 this time means that the ServiceComb version has officially entered a stable state on the premise of meeting the requirements of the Apache Software Foundation. The main new features and enhancements of ServiceComb Java-chassis and Service-center after ent [...] + + +## Java-chassis + +- New Metrics module; Added a large number of monitoring indicators; Support Prometheus integration +- Re-org the configuration center, support docking Ctrip Apollo as a configuration center, and easily extend the docking of other three-party configuration centers +- The POJO programming model allows users to use CompletableFuture asynchronous programming +- The POJO programming model allows users to use Object and Generic types as invoke parameters +- Upgrade Zipkin to Zipkin2, and support both v1 and v2 versions of Zipkin server +- Micro-service communication provides file stream capability and supports multimedia scenes such as music and pictures +- Added support for API level QPS control based on service level QPS control; + - Now we support using `servicecomb.flowcontrol.Consumer.qps.limit.[ServiceName].[Schema].[operation]` to config the API level QPS control +- Added `scaffold` and [start.servicecomb.io](http://start.servicecomb.io) to allow users quickly build projects and provide complete out-of-the-box capabilities + - Now create a ServiceComb microservice can be quickly built by Apache Maven Archetype. For more details, please refer to [ServiceComb Java Chassis Archetypes](https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/archetypes/README.md) , or you can directly access [start.servicecomb.io](http://start.servicecomb.io) to use the `SPRING INITIALIZR UI` intergated by ServiceComb . + +- Added a demonstration of how to build a ServiceComb project using `Gradle` +- We added the Gradle configuration to the
[GitHub] wangkirin opened a new pull request #132: add english version release note of v1.0.0
wangkirin opened a new pull request #132: add english version release note of v1.0.0 URL: https://github.com/apache/incubator-servicecomb-website/pull/132 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 With regards, Apache Git Services
[GitHub] veily opened a new issue #422: No 1.0.0 release tag in Docker hub.
veily opened a new issue #422: No 1.0.0 release tag in Docker hub. URL: https://github.com/apache/incubator-servicecomb-service-center/issues/422 ![image](https://user-images.githubusercontent.com/1586298/44332078-c400af00-a49d-11e8-9dc0-4678003cc834.png) ![image](https://user-images.githubusercontent.com/1586298/44332086-ccf18080-a49d-11e8-9355-2d8c490d36ee.png) 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 With regards, Apache Git Services
[GitHub] HuZheting commented on issue #253: when AbortEvent is late
HuZheting commented on issue #253: when AbortEvent is late URL: https://github.com/apache/incubator-servicecomb-saga/issues/253#issuecomment-414253244 Looking forward for new alpha-server. And you can close this issue. 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211167273 ## File path: java-chassis-reference/en_US/using-java-chassis-in-spring-boot/components-for-spring-boot.md ## @@ -1,30 +1,29 @@ -针对Spring Boot、Spring Cloud,提供了如下几个组件: +For Spring Boot, Spring Cloud, the following components are provided: * spring-boot-starter-configuration -接入配置中心。当需要在Spring Boot、Spring Cloud应用中,使用配置中心作为动态配置管理工具的时候,需要依赖。 +Access the configuration center. When you need to use the Configuration Center as a dynamic configuration management tool in Spring Boot and Spring Cloud applications, you need dependence of them. * spring-boot-starter-registry -接入服务中心。当需要在Spring Boot、Spring Cloud应用中,使用服务中心作为服务注册、发现管理工具的时候,需要依赖。 +Access to the service center. When you need to use the service center as a service registration and discovery management tool in Spring Boot and Spring Cloud applications, you need dependence of them. * spring-boot-starter-discovery -适配Spring Cloud的DiscoveryClient接口。当在Spring Cloud中使用@EnableDiscoveryClient时,需要依赖。 +Adapt to the Spring Cloud's DiscoveryClient interface. When using @EnableDiscoveryClient in Spring Cloud, you need dependence of them. * spring-boot-starter-provider -在Spring Boot中通过@EnableServiceComb启用java chassis的核心功能。这个功能可以用于“JAVA应用方式”和”Web开发方式“。 在”Web开发方式”中,通过spring.main.web-environment=false禁用了Web环境。因此,这个模块主要是解决”JAVA应用方式“的问题。 +Enable the core functionality of java chassis via @EnableServiceComb in Spring Boot. This feature can be used for "JAVA application mode" and "Web development mode". In the "Web development method", the web environment is disabled by spring.main.web-environment=false. Therefore, this module is mainly to solve the problem of "JAVA application mode". Review comment: Web development method -> Web development mode 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 With regards, Apache Git Services
[GitHub] tianxiaoliang commented on issue #415: 发布在k8s集群时,可有考虑etcd数据持久化。
tianxiaoliang commented on issue #415: 发布在k8s集群时,可有考虑etcd数据持久化。 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/415#issuecomment-414226243 好建议 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211166806 ## File path: java-chassis-reference/en_US/question-and-answer/service-center-error-diagnosis.md ## @@ -31,51 +31,50 @@ servicecomb: akskCustomCipher: default ``` -可以登陆华为云,在“我的凭证”里面查询到accessKey信息,secretKey由用户自己保存,无法查询。如果忘记相关凭证,可以删除凭证信息,生成新的凭证信息。 +You can log in to Huawei Cloud and query the accessKey information in "My Credentials". The secretKey is saved by the user and cannot be queried. If you forget the relevant credentials, you can delete the voucher information and generate new voucher information. # \#2 -* 异常消息 +* Exception message {"errorCode":"401002","errorMessage":"Request unauthorized","detail":"Get service token from iam proxy failed,{\"error\":\"validate ak sk error\"}"} -* 问题原因 +* Reason of problem -AK、SK不正确。 +AK, SK are not correct. -* 排查方法 +* Troubleshooting method -检查microservice.yaml中的ak/sk配置是否正确。可以登陆华为云,在“我的凭证”里面查询到accessKey信息,secretKey由用户自己保存,无法查询。如果忘记相关凭证,可以删除凭证信息,生成新的凭证信息。 +Check if the ak/sk configuration in microservice.yaml is correct. You can log in to Huawei Cloud and query the accessKey information in "My Credentials". The secretKey is saved by the user and cannot be queried. If you forget the relevant credentials, you can delete the voucher information and generate new voucher information. # \#3 -* 异常消息 +* Exception message {"errorCode":"401002","errorMessage":"Request unauthorized","detail":"Get service token from iam proxy failed,{\"error\":\"get project token from iam failed. error:http post failed, statuscode: 400\"}"} -* 问题原因 +* Reason of problem -Project名称不正确。 +The Project name is incorrect. -* 排查方法 +* Troubleshooting method -检查配置项servicecomb.credentials.project的值是否正确,在“我的凭证”里面查询正确的Project名称。如果没有这个配置项,默认会根据服务中心的域名进行判断。当域名也不包含合法的Project名称的时候,需要增加这个配置项,保证其名称是“我的凭证”里面合法的Project名称。 +Check if the value of the configuration item servicecomb.credentials.project is correct, and query the correct Project name in "My Credentials". If there is no such configuration item, the default will be based on the domain name of the service center. When the domain name does not contain a legal Project name, you need to add this configuration item to ensure that its name is the legal Project name in "My Credentials". # \#4 -* 异常消息 +* Exception message {"errorCode":"41","errorMessage":"Invalid parameter\(s\)","detail":"Version validate failed, rule: {Length: 64,Length: ^\[a-zA-Z0-9\_ [\\-.\]\*$}](\\-.]*$}) "} -* 问题原因 +* Reason of problem -使用新版本SDK连接服务中心的老版本。 +Use the new version of the SDK to connect to an older version of the Service Center. -* 排查方法 - -检查服务中心的版本。可以从华为云官网下载最新版本的服务中心,或者从ServiceComb官网下载最新版本的服务中心。 +* Troubleshooting method +Check the version of the service center. You can download the latest version of the service center from the Huawei Cloud official website, or download the latest version of the service center from ServiceComb's official website. Review comment: 去掉中英文华为云官网部分 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211166159 ## File path: java-chassis-reference/en_US/question-and-answer/service-center-error-diagnosis.md ## @@ -31,51 +31,50 @@ servicecomb: akskCustomCipher: default ``` -可以登陆华为云,在“我的凭证”里面查询到accessKey信息,secretKey由用户自己保存,无法查询。如果忘记相关凭证,可以删除凭证信息,生成新的凭证信息。 +You can log in to Huawei Cloud and query the accessKey information in "My Credentials". The secretKey is saved by the user and cannot be queried. If you forget the relevant credentials, you can delete the voucher information and generate new voucher information. # \#2 -* 异常消息 +* Exception message {"errorCode":"401002","errorMessage":"Request unauthorized","detail":"Get service token from iam proxy failed,{\"error\":\"validate ak sk error\"}"} -* 问题原因 +* Reason of problem -AK、SK不正确。 +AK, SK are not correct. -* 排查方法 +* Troubleshooting method -检查microservice.yaml中的ak/sk配置是否正确。可以登陆华为云,在“我的凭证”里面查询到accessKey信息,secretKey由用户自己保存,无法查询。如果忘记相关凭证,可以删除凭证信息,生成新的凭证信息。 +Check if the ak/sk configuration in microservice.yaml is correct. You can log in to Huawei Cloud and query the accessKey information in "My Credentials". The secretKey is saved by the user and cannot be queried. If you forget the relevant credentials, you can delete the voucher information and generate new voucher information. Review comment: voucher information -> credential information,保持一致比较好 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211165740 ## File path: java-chassis-reference/en_US/question-and-answer/service-center-error-diagnosis.md ## @@ -31,51 +31,50 @@ servicecomb: akskCustomCipher: default ``` -可以登陆华为云,在“我的凭证”里面查询到accessKey信息,secretKey由用户自己保存,无法查询。如果忘记相关凭证,可以删除凭证信息,生成新的凭证信息。 +You can log in to Huawei Cloud and query the accessKey information in "My Credentials". The secretKey is saved by the user and cannot be queried. If you forget the relevant credentials, you can delete the voucher information and generate new voucher information. Review comment: log in -> login 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 With regards, Apache Git Services
[GitHub] veily commented on issue #415: 发布在k8s集群时,可有考虑etcd数据持久化。
veily commented on issue #415: 发布在k8s集群时,可有考虑etcd数据持久化。 URL: https://github.com/apache/incubator-servicecomb-service-center/issues/415#issuecomment-414224926 不是。我看示例的k8s集成部署并没有说明 etcd的数据卷挂载相关的(etcd是有状态的),建议在文档里边提几句,说明线上k8s部署service center的最佳实践。 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211164540 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -197,79 +196,79 @@ public String sayHello(@RequestBody Person person){ } ``` -# 问题描述: body Model部分暴露 +# Problem: Partial exposure of body Model -** 解决方法:** +** Solution:** -一个接口对应的body对象中,可能有一些属性是内部的,不想开放出去,生成schema的时候不要带出去,使用: +In the body object corresponding to an interface, there may be some attributes that are internal. Do not want to open it. Do not bring it out when generating the schema. Use: ```java @ApiModelProperty(hidden = true) ``` -# 问题描述:框架获取远端consumer的地址 +# Problem: The framework obtains the address of the remote consumer -** 解决方法:** +** Solution:** -如果使用http rest方式(使用transport-rest-vertx依赖)可以用下面这种方式获取: +If you use the http rest method (using the transport-rest-vertx dependency) you can get it in the following way: ```java HttpServletRequest request = (HttpServletRequest) invocation.getHandlerContext().get(RestConst.REST_REQUEST); String host = request.getRemoteHost(); ``` -实际场景是拿最外层的地址,所以应该是LB传入到edgeservice,edgeService再放到context外下传递。 +The actual scene is to take the external address, so it should be LB passed to edgeservice, and edgeService is then passed to the context and passed. -# 问题描述:对handler描述 +# Problem: Description of the handler -** 解决方法:** +** Solution:** -consumer默认的handler是simpleLB,没有配置的时候handler链会使用这个,如果配置了handler,里面一定要包含lb的handler,否则调用报错,需要在文档里面进行说明。 +Consumer default handler is simpleLB, and the handler chain will use this when there is no configuration, if the handler is configured, it must contain the lb handler. Otherwise the call error, need to be described in the document. -# 问题描述:netty版本问题 +# Problem: Netty version problem -** 解决方法:** +** Solution:** -netty3和netty4是完全不同的三方件,因为坐标跟package都不相同,所以可以共存,但是要注意小版本问题,小版本必须使用的版本。 +Netty3 and netty4 are completely different tripartites because the coordinates are not the same as the package, so they can coexist, but pay attention to the minor version problem, the version that the small version must use. -# 问题描述:服务超时设置 +# Problem: Service Timeout Settings -** 解决方法:** +** Solution:** -在微服务描述文件(microservice.yaml)中添加如下配置: +Add the following configuration to the microservice description file (microservice.yaml): ``` servicecomb: request: timeout: 3 ``` -# 问题描述:服务治理的处理链顺序是否有要求? +# Problem: Is there a requirement for the processing chain of service governance? -**解决方法:** +**Solution:** -处理链的顺序不同,那么系统工作行为也不同。 下面列举一下常见问题。 +The order of the processing chains is different, and the system works differently. List the common questions below. -1、loadbalance和bizkeeper-consumer +1, loadbalance and bizkeeper-consumer -这两个顺序可以随机组合。但是行为是不一样的。 +These two sequences can be combined randomly. But the behavior is different. -当loadbalance在前面的时候,那么loadbalance提供的重试功能会在bizkeeper-consumer抛出异常时发生,比如超时等。但是如果已经做了fallbackpolicy配置,比如returnnull,那么loadbalance则不会重试。 +When loadbalance is in the front, the retry function provided by loadbalance will occur when bizkeeper-consumer throws an exception, such as timeout. But if you have done a fallback policy configuration, such as return null, then loadbalance will not retry. -如果loadbalance在后面,那么loadbalance的重试会延长超时时间,即使重试成功,如果bizkeeper-consumer设置的超时时间不够,那么最终的调用结果也是失败。 +If loadbalance is behind, the retry will extend the timeout. Even if the retry is successful, if the timeout period set by bizkeeper-consumer is not enough, the final call result will also fail. -2、tracing-consumer,sla-consumer,tracing-provider,sla-provider +2, tracing-consumer, sla-consumer, tracing-provider, sla-provider -这些处理链建议放到处理链的最开始位置,保证成功、失败的情况都可以记录日志(由于记录日志需要IP等信息,对于消费者,只能放到loadbalance后面)。 +These processing chains are recommended to be placed at the very beginning of the processing chain to ensure that the success and failure of the log can be recorded (because the log requires IP and other information, for consumers, can only be placed behind the loadbalance). -如果不需要记录客户端返回的异常,则可以放到末尾,只关注网络层返回的错误。但是如果bizkeeper-consumer等超时提前返回的话,则可能不会记录日志。 +If you do not need to record the exception returned by the client, you can put it to the end and only pay attention to the error returned by the network layer. However, if the bizkeeper-consumer timeout returns earlier, the log may not be logged. -3、建议的顺序 +3. Suggested order Consumer: loadbalance, tracing-consumer, sla-consumer, bizkeeper-consumer Provider: tracing-provider, sla-provider, bizkeeper-provider -这种顺序能够满足大多数场景,并且不容易出现不可理解的错误。 +This order is sufficient for most scenarios and is not prone to incomprehensible errors. Review comment: is not prone to incomprehensible errors ... This is an automated message from the
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211163870 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -197,79 +196,79 @@ public String sayHello(@RequestBody Person person){ } ``` -# 问题描述: body Model部分暴露 +# Problem: Partial exposure of body Model -** 解决方法:** +** Solution:** -一个接口对应的body对象中,可能有一些属性是内部的,不想开放出去,生成schema的时候不要带出去,使用: +In the body object corresponding to an interface, there may be some attributes that are internal. Do not want to open it. Do not bring it out when generating the schema. Use: ```java @ApiModelProperty(hidden = true) ``` -# 问题描述:框架获取远端consumer的地址 +# Problem: The framework obtains the address of the remote consumer -** 解决方法:** +** Solution:** -如果使用http rest方式(使用transport-rest-vertx依赖)可以用下面这种方式获取: +If you use the http rest method (using the transport-rest-vertx dependency) you can get it in the following way: ```java HttpServletRequest request = (HttpServletRequest) invocation.getHandlerContext().get(RestConst.REST_REQUEST); String host = request.getRemoteHost(); ``` -实际场景是拿最外层的地址,所以应该是LB传入到edgeservice,edgeService再放到context外下传递。 +The actual scene is to take the external address, so it should be LB passed to edgeservice, and edgeService is then passed to the context and passed. -# 问题描述:对handler描述 +# Problem: Description of the handler -** 解决方法:** +** Solution:** -consumer默认的handler是simpleLB,没有配置的时候handler链会使用这个,如果配置了handler,里面一定要包含lb的handler,否则调用报错,需要在文档里面进行说明。 +Consumer default handler is simpleLB, and the handler chain will use this when there is no configuration, if the handler is configured, it must contain the lb handler. Otherwise the call error, need to be described in the document. -# 问题描述:netty版本问题 +# Problem: Netty version problem -** 解决方法:** +** Solution:** -netty3和netty4是完全不同的三方件,因为坐标跟package都不相同,所以可以共存,但是要注意小版本问题,小版本必须使用的版本。 +Netty3 and netty4 are completely different tripartites because the coordinates are not the same as the package, so they can coexist, but pay attention to the minor version problem, the version that the small version must use. -# 问题描述:服务超时设置 +# Problem: Service Timeout Settings -** 解决方法:** +** Solution:** -在微服务描述文件(microservice.yaml)中添加如下配置: +Add the following configuration to the microservice description file (microservice.yaml): ``` servicecomb: request: timeout: 3 ``` -# 问题描述:服务治理的处理链顺序是否有要求? +# Problem: Is there a requirement for the processing chain of service governance? Review comment: 这个翻译不对,是对顺序是否有要求,不是对治理链有要求 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211163025 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -144,47 +143,47 @@ Caused by: java.lang.ClassFormatError: Method "testInherate" in class ? has ille $ref: "#/definitions/ReponseImpl" ``` -# 问题描述:微服务框架服务调用是否使用长连接 +# Problem: Does the microservices framework service call use long connections? -** 解决方法:** +** Solution:** -http使用的是长连接(有超时时间),highway方式使用的是长连接(一直保持)。 +Http uses a long connection (with a timeout), and the highway mode uses a long connection (always on). -# 问题描述:服务断连服务中心注册信息是否自动删除 +# Problem: Whether the service disconnection service's center registration information is automatically deleted Review comment: 这个翻译有点不大通顺? 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211161772 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -144,47 +143,47 @@ Caused by: java.lang.ClassFormatError: Method "testInherate" in class ? has ille $ref: "#/definitions/ReponseImpl" ``` -# 问题描述:微服务框架服务调用是否使用长连接 +# Problem: Does the microservices framework service call use long connections? Review comment: long connections -> long live connection 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211161465 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -68,23 +67,23 @@ servicecomb: transport: highway ``` -* 当一个微服务producer只开放了highway的endpoint +* When a microservice producer only opens the endpoint of the highway - * consumer进程只部署了highway transport jar,则正常使用higway访问 - * consumer进程只部署了RESTful transport jar,则无法访问 - * consumer进程同时部署了highway和RESTful transport jar,则正常使用highway访问 + * The consumer process only deploys the highway transport jar, and normally uses higway access. Review comment: 上面是endpoint,下面access应该对应是endpoint 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211160958 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -68,23 +67,23 @@ servicecomb: transport: highway ``` -* 当一个微服务producer只开放了highway的endpoint +* When a microservice producer only opens the endpoint of the highway Review comment: opens -> provided 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211160771 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -33,33 +33,32 @@ public int test(int x) { } ``` -# 问题描述: 如何定制自己微服务的日志配置 +# Problem: How to customize the log configuration of your own microservice -** 解决方法:** -ServiceComb不绑定日志器,只是使用了slf4j,用户可以自由选择log4j/log4j2/logback等等。ServiceComb提供了一个log4j的扩展,在标准log4j的基础上,支持log4j的properties文件的增量配置。 +** Solution:** +ServiceComb does not bind the logger, use slf4j, users can freely choose log4j/log4j2/logback and so on. +ServiceComb provides a log4j extension that supports incremental configuration of log4j's properties files on a standard log4j basis. -* 默认以规则:"classpath\*:config/log4j.properties"加载配置文件 -* 实际会搜索出classpath中所有的`config/log4j.properties和config/log4j.*.properties`, 从搜索出的文件中切出`\*`的部分,进行alpha排序,然后按顺序加载,最后合成的文件作为log4j的配置文件。 -* 如果要使用ServiceComb的log4j扩展,则需要调用Log4jUtils.init,否则完全按标准的日志器的规则使用。 +* By default, the configuration file is loaded from the path: "classpath\*:config/log4j.properties" +* It will actually search all the `config/log4j.properties and config/log4j.*.properties` in the classpath, cut out the `\*` part from the searched file, sort the alpha, then load it in order, and finally compose The file is used as the log4j configuration file. +* If you want to use ServiceComb's log4j extension, you need to call Log4jUtils.init, otherwise it will be used according to the rules of the standard logger. -# 问题描述: 当服务配置了多个transport的时候,在运行时是怎么选择使用哪个transport的? +# Problem: When the service is configured with multiple transports, how do you choose which transport to use at runtime? Review comment: how do you choose which transport to use at runtime? 好像不是这个意思 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 With regards, Apache Git Services
[GitHub] zhengyangyong commented on a change in pull request #37: update question-and-answer translation
zhengyangyong commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211160489 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -144,47 +143,47 @@ Caused by: java.lang.ClassFormatError: Method "testInherate" in class ? has ille $ref: "#/definitions/ReponseImpl" ``` -# 问题描述:微服务框架服务调用是否使用长连接 +# Problem: Does the microservices framework service call use long connections? -** 解决方法:** +** Solution:** -http使用的是长连接(有超时时间),highway方式使用的是长连接(一直保持)。 +Http uses a long connection (with a timeout), and the highway mode uses a long connection (always on). -# 问题描述:服务断连服务中心注册信息是否自动删除 +# Problem: Whether the service disconnection service's center registration information is automatically deleted -** 解决方法:** +** Solution:** -服务中心心跳检测到服务实例不可用,只会移除服务实例信息,服务的静态数据不会移除。 +The service center heartbeat detects that the service instance is unavailable, only the service instance information is removed, and the static data of the service is not removed. -# 问题描述:微服务框架如何实现数据多个微服务间透传 +# Problem: How does the microservices framework achieve transparent transmission of data between multiple microservices? -** 解决方法:** +** Solution:** -透传数据塞入: +Transmitting data into: ```java CseHttpEntity httpEntity = new CseHttpEntity<>(xxx); -//透传内容 +//Transparent content Review comment: 可以改为:如何在多个微服务之间传递上下文,透传是中文的说法,应该没必要逐字翻译 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 With regards, Apache Git Services
[GitHub] imlidian opened a new pull request #38: update Packaging dir translation
imlidian opened a new pull request #38: update Packaging dir translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/38 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 With regards, Apache Git Services
[GitHub] imlidian commented on a change in pull request #37: update question-and-answer translation
imlidian commented on a change in pull request #37: update question-and-answer translation URL: https://github.com/apache/incubator-servicecomb-docs/pull/37#discussion_r211153307 ## File path: java-chassis-reference/en_US/question-and-answer/question_answer.md ## @@ -144,47 +143,47 @@ Caused by: java.lang.ClassFormatError: Method "testInherate" in class ? has ille $ref: "#/definitions/ReponseImpl" ``` -# 问题描述:微服务框架服务调用是否使用长连接 +# Problem: Does the microservices framework service call use long connections? -** 解决方法:** +** Solution:** -http使用的是长连接(有超时时间),highway方式使用的是长连接(一直保持)。 +Http uses a long connection (with a timeout), and the highway mode uses a long connection (always on). -# 问题描述:服务断连服务中心注册信息是否自动删除 +# Problem: Whether the service disconnection service's center registration information is automatically deleted -** 解决方法:** +** Solution:** -服务中心心跳检测到服务实例不可用,只会移除服务实例信息,服务的静态数据不会移除。 +The service center heartbeat detects that the service instance is unavailable, only the service instance information is removed, and the static data of the service is not removed. -# 问题描述:微服务框架如何实现数据多个微服务间透传 +# Problem: How does the microservices framework achieve transparent transmission of data between multiple microservices? -** 解决方法:** +** Solution:** -透传数据塞入: +Transmitting data into: ```java CseHttpEntity httpEntity = new CseHttpEntity<>(xxx); -//透传内容 +//Transparent content Review comment: transparent transmission content? 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 With regards, Apache Git Services