You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/01/27 20:27:50 UTC
[GitHub] coolbeevip opened a new pull request #398: [SCB-1130] Fix single
point failure of Alpha cluster when scanner enabled node shutdown
coolbeevip opened a new pull request #398: [SCB-1130] Fix single point failure of Alpha cluster when scanner enabled node shutdown
URL: https://github.com/apache/servicecomb-pack/pull/398
Dynamically configure the master node base on master_lock table
Configure `alpha.cluster.master.enabled=true` to activate this feature
### Attention
* mysql need configure `serverTimezone=GMT%2b8`
* need configure NTP
### example
Start two nodes
You can see the `Master Node` or `Slave Node` in the log. When the Master Node shutdown, Slave Node change to the Master Node.
```
java -jar alpha-server-0.4.0-SNAPSHOT-exec.jar \
--server.port=0 \
--alpha.server.port=8080 \
--spring.datasource.url="jdbc:postgresql://127.0.0.1:5432/saga?useSSL=false" \
--spring.datasource.username=saga-user \
--spring.datasource.password=saga-password \
--alpha.cluster.master.enabled=true
```
```
java -jar alpha-server-0.4.0-SNAPSHOT-exec.jar \
--server.port=0 \
--alpha.server.port=8081 \
--spring.datasource.url="jdbc:postgresql://127.0.0.1:5432/saga?useSSL=false" \
--spring.datasource.username=saga-user \
--spring.datasource.password=saga-password \
--alpha.cluster.master.enabled=true
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services