Code Monkey home page Code Monkey logo

gotcc's People

Contributors

xiaoxuxiansheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gotcc's Issues

大佬,请问为什么在transaction方法中已经等待一个事务的所有组件更新try请求状态,而在advanceProgress方法中又调用getStatus遍历一个事务的所有组件try请求状态,怎么可能会出现TXHanging状态呢?因为在transaction中必然将try请求更新状态为fail或者success

大佬,请问为什么在transaction方法中已经等待一个事务的所有组件更新try请求状态,而在advanceProgress方法中又调用getStatus遍历一个事务的所有组件try请求状态,怎么可能会出现TXHanging状态呢?因为在transaction中必然将try请求更新状态为fail或者success,这点我很奇怪,是我代码理解错误了吗?

代码逻辑疑问

resp, err := componentEntity.Component.Try(cctx, &component.TCCReq{ ComponentID: componentEntity.Component.ID(), TXID: txID, Data: componentEntity.Request, }) // 但凡有一个 component try 报错或者拒绝,都是需要进行 cancel 的,但会放在 advanceProgressByTXID 流程处理 if err != nil || !resp.ACK { log.ErrorContextf(cctx, "tx try failed, tx id: %s, comonent id: %s, err: %v", txID, componentEntity.Component.ID(), err) // 对对应的事务进行更新 if _err := t.txStore.TXUpdate(cctx, txID, componentEntity.Component.ID(), false); _err != nil { log.ErrorContextf(cctx, "tx updated failed, tx id: %s, component id: %s, err: %v", txID, componentEntity.Component.ID(), _err) } errCh <- fmt.Errorf("component: %s try failed", componentEntity.Component.ID()) return } // try 请求成功,但是请求结果更新到事务日志失败时,也需要视为处理失败 if err = t.txStore.TXUpdate(cctx, txID, componentEntity.Component.ID(), true); err != nil { log.ErrorContextf(cctx, "tx updated failed, tx id: %s, component id: %s, err: %v", txID, componentEntity.Component.ID(), err) errCh <- err }这段代码已经明确表示了try请求的状态必然被更新为fail或success,那getStatus方法怎么可能会返回TXHanging呢?

大佬,请问为什么在transaction方法中已经等待一个事务的所有组件更新try请求状态,而在advanceProgress方法中又调用getStatus遍历一个事务的所有组件try请求状态,怎么可能会出现TXHanging状态呢?因为在transaction中必然将try请求更新状态为fail或者success

大佬,请问为什么在transaction方法中已经等待一个事务的所有组件更新try请求状态,而在advanceProgress方法中又调用getStatus遍历一个事务的所有组件try请求状态,怎么可能会出现TXHanging状态呢?因为在transaction中必然将try请求更新状态为fail或者success,这点我很奇怪,是我代码理解错误了吗?

readme小建议

readme里的这个可以换成.,这样本地离线或者gitee也能看
https://github.com/xiaoxuxiansheng/gotcc/blob/main

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.