Skip to content

Commit

Permalink
Feature: save tcc action context to fencelog
Browse files Browse the repository at this point in the history
  • Loading branch information
pengten authored and asta-yang committed Oct 5, 2022
1 parent 8ede2d8 commit fb18b42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions script/client/tcc/db/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS `tcc_fence_log`
`branch_id` BIGINT NOT NULL COMMENT 'branch id',
`action_name` VARCHAR(64) NOT NULL COMMENT 'action name',
`status` TINYINT NOT NULL COMMENT 'status(tried:1;committed:2;rollbacked:3;suspended:4)',
`application_data` varchar(2000) DEFAULT NULL COMMENT 'the application context',
`gmt_create` DATETIME(3) NOT NULL COMMENT 'create time',
`gmt_modified` DATETIME(3) NOT NULL COMMENT 'update time',
PRIMARY KEY (`xid`, `branch_id`),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ public Map<String, Object> getActionContext() {
* @param actionContext the action context
*/
public void setActionContext(Map<String, Object> actionContext) {
boolean isChange = this.actionContext != actionContext;
this.actionContext = actionContext;
if (isChange) {
if (this.actionContext != actionContext) {
this.actionContext = actionContext;
this.setUpdated(true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* the constants of businessActionContext store
* @author pengten
*/
public interface ContextStoreConstant {

Expand Down

0 comments on commit fb18b42

Please sign in to comment.