Skip to content

Commit

Permalink
release 0.1.1 (apache#178)
Browse files Browse the repository at this point in the history
* Remove redundant semicolons and modify non-standard names

* remove duplicate RM init

* issue apache#86 length of applicationData should be int

* fix: fixed qualifier

* Modify method description of DemoCode

* Update ConfigurationKeys.java

* config instance obtained by the factory class

* fix typo of `retryable` as the annotation of Spring Retryable. add static code to init BranchStatus mapper to speed up get(int ordinal)

* add template

* add template

* add template

* fixes apache#117

* fixes apache#114

* fix issue apache#122

* update template

* fix file.RenameTo->Files.move

* apache#73 add travis config

* fix apache#121

* apache#73 add travis config

* fix apache#135 delete BranchSession main

* fix apache#137 param position err

* fix apache#142 delete defaultEventExecutorGroup

* fix apache#142 delete defaultEventExecutorGroup (apache#144)

* fix apache#139 netty heartbeat configurable

* fixes apache#139 heartbeat configurable (apache#146)

* fix apache#142 delete defaultEventExecutorGroup

* fix apache#139 netty heartbeat configurable

* FileTransactionStoreManager#closeFile() method remove redundant fileChannel.close() invoke (apache#140)

* fix: When local branch change nothing, the RC will rise an NullpointerException (apache#155)

* bugfix: when no record changed register localBranch will occur exception
in TC

* clean the environment

* enhancement: when no changes in local branch let RC not throw an
NullpointerException

* change tabs to spaces

* fix apache#150 use ServerBootstrap#childOption() to set SO_KEEPALIVE (apache#151)

* FileTransactionStoreManager#closeFile() method remove redundant fileChannel.close() invoke

* Netty SO_KEEPALIVE option not works on ServerBootstrap#option(), should replace with ServerBootstrap#childOption()

* fix apache#149 (long)->Number.longValue

*  fix apache#149 (long)->Number.longValue (apache#156)

* fix apache#142 delete defaultEventExecutorGroup

* fix apache#139 netty heartbeat configurable

* fix apache#149 (long)->Number.longValue

* remove mistake twitter icon (apache#165)

* Update README.md

* Update README.md

* issue apache#110 bug fix for RM channel management (apache#169)

* issue apache#110 fix RM channel management

* fix merge mistake

* issue apache#110 enhance: if no channel found on my application set, try other application on the same resource.

* bug fix and enhance

* issue apache#110 enhance the original fix

* fix: Unify `undo_log` table name variable (apache#174)

* ShowSql might be better when debugging to execute the demo to observe the data. (apache#164)

issues apache#158

* revert OrderServiceImpl
  • Loading branch information
slievrly authored Jan 18, 2019
1 parent 33275c7 commit e10063c
Show file tree
Hide file tree
Showing 38 changed files with 502 additions and 373 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug Report
about: If you would like to report a issue to Fescar, please use this template.


---

- [ ] I have searched the [issues](https://github.com/alibaba/fescar/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description


### Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

```
Just paste your stack trace here!
```


### Ⅲ. Describe what you expected to happen


### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?


### Ⅵ. Environment:

- JDK version :
- OS :
- Others:
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: Suggest an idea for Fescar

---

## Why you need it?
Is your feature request related to a problem? Please describe in details


## How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.


## Other related information
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Please make sure you have read and understood the contributing guidelines -->

### Ⅰ. Describe what this PR did


### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->


### Ⅲ. Why don't you add test cases (unit test/integration test)?


### Ⅳ. Describe how to verify it


### Ⅴ. Special notes for reviews

42 changes: 31 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# Created by .ignore support plugin (hsz.mobi)
.idea
.classpath
# maven ignore
target/
*.jar
*.war
*.zip
*.tar
*.tar.gz
*.class

# eclipse ignore
.settings/
.project
.settings
target
.DS_Store
/logs
.classpath

# idea ignore
.idea/
*.ipr
*.iml
*.class
/distribution/bin
/distribution/conf
/distribution/lib
*.iws

# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
distribution/*

# system ignore
.DS_Store
Thumbs.db
*.orig
*.class
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: java
sudo: false # faster builds

jdk:
- oraclejdk7
- openjdk7

cache:
directories:
Expand All @@ -11,7 +11,8 @@ cache:
install: true

script:
- travis_wait 30 ./mvnw clean install -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true
- mvn clean package
- mvn cobertura:cobertura

after_success:
- bash <(curl -s https://codecov.io/bash)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# FESCAR: Fast & Easy Commit And Rollback

[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

-------
[![Build Status](https://travis-ci.org/alibaba/fescar.svg?branch=develop)](https://travis-ci.org/alibaba/fescar)
[![codecov](https://codecov.io/gh/alibaba/fescar/branch/develop/graph/badge.svg)](https://codecov.io/gh/alibaba/fescar)
![license](https://img.shields.io/github/license/alibaba/fescar.svg)

## What is FESCAR?

Expand Down Expand Up @@ -71,7 +71,7 @@ You can view the full documentation from the wiki: [FESCAR wiki page](https://gi

## Reporting bugs

Please follow the [template](https://github.com/TBD) for reporting any issues.
Please follow the [template]() for reporting any issues.


## Contributing
Expand All @@ -81,7 +81,7 @@ Contributors are welcomed to join the FEATS project. Please check [CONTRIBUTING]

## Contact

* [Twitter](https://twitter.com/fescar): TBD. Follow along for latest FESCAR news on Twitter.
* [Twitter](): TBD. Follow along for latest FESCAR news on Twitter.
* Email Group:
* [email protected]: FESCAR developer discussion (APIs, feature design, etc).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class EnhancedServiceLoader {
private static Map<Class, List<Class>> providers = new ConcurrentHashMap<Class, List<Class>>();

/**
* 指定classloader加载server provider
* 指定classLoader加载server provider
*
* @param service
* @param loader
Expand Down Expand Up @@ -83,7 +83,7 @@ public static <S> S load(Class<S> service, String activateName) throws EnhancedS
}

/**
* 指定classloader加载server provider
* 指定classLoader加载server provider
*
* @param service
* @param loader
Expand Down
2 changes: 2 additions & 0 deletions config/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ transport {
type = "TCP"
#NIO NATIVE
server = "NIO"
#enable heartbeat
heartbeat = true
#thread factory for netty
thread-factory {
boss-thread-prefix = "NettyBoss"
Expand Down
38 changes: 25 additions & 13 deletions core/src/main/java/com/alibaba/fescar/core/model/BranchStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import com.alibaba.fescar.common.exception.ShouldNeverHappenException;

import java.util.HashMap;
import java.util.Map;

/**
* Status of branch transaction.
*/
Expand All @@ -41,31 +44,40 @@ public enum BranchStatus {
// Commit logic is successfully done at phase two.
PhaseTwo_Committed,

// Commit logic is failed but retriable.
PhaseTwo_CommitFailed_Retriable,
// Commit logic is failed but retryable.
PhaseTwo_CommitFailed_Retryable,

// Commit logic is failed and NOT retriable.
PhaseTwo_CommitFailed_Unretriable,
// Commit logic is failed and NOT retryable.
PhaseTwo_CommitFailed_Unretryable,

// Rollback logic is successfully done at phase two.
PhaseTwo_Rollbacked,

// Rollback logic is failed but retriable.
PhaseTwo_RollbackFailed_Retriable,
// Rollback logic is failed but retryable.
PhaseTwo_RollbackFailed_Retryable,

// Rollback logic is failed but NOT retryable.
PhaseTwo_RollbackFailed_Unretryable;

// Rollback logic is failed but NOT retriable.
PhaseTwo_RollbackFailed_Unretriable;
private static final Map<Integer, BranchStatus> map = new HashMap<>(values().length);

static {
for (BranchStatus status : values()) {
map.put(status.ordinal(), status);
}
}

public static BranchStatus get(byte ordinal) {
return get((int) ordinal);
}

public static BranchStatus get(int ordinal) {
for (BranchStatus branchStatus : BranchStatus.values()) {
if (branchStatus.ordinal() == ordinal) {
return branchStatus;
}
BranchStatus status = map.get(ordinal);

if (null == status) {
throw new ShouldNeverHappenException("Unknown BranchStatus[" + ordinal + "]");
}
throw new ShouldNeverHappenException("Unknown BranchStatus[" + ordinal + "]");

return status;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public boolean decode(ByteBuf in) {
leftLen -= resourceIdLen;
}

int applicationDataLen = in.readShort();
int applicationDataLen = in.readInt();
if (applicationDataLen > 0) {
if (leftLen < applicationDataLen) {
return false;
Expand Down
Loading

0 comments on commit e10063c

Please sign in to comment.