Skip to content

Conversation

@kids-return
Copy link
Contributor

No description provided.

@kids-return
Copy link
Contributor Author

barrierId 应该为每个请求多次调用进行累加
hyperf 下 常驻内存,一直累加导致事务屏障失效

@kids-return
Copy link
Contributor Author

中间件我没使用 gRPC 下使用中间件会出现一些问题,handle 会执行两次,修起来比较麻烦
我是抛弃了中间件 使用了 AOP 处理的

@kids-return
Copy link
Contributor Author

目前gRPC 还是跑不通的 涉及到 hyperf 那边 gRPC Server 和 gRPC Client 的修改

@kids-return
Copy link
Contributor Author

我晚点再去 hyperf 那边把 server 和 client 修一下

public static function getOp(): string
{
return static::get(static::class . '.op');
return static::get(static::class . '.op', '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的OP会为空吗

public static function getTransType(): string
{
return static::get(static::class . '.transType');
return static::get(static::class . '.transType', '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里事务类型什么时候会为空

$op = TransContext::getOp();

$barrierID = ++$this->barrierId;
$barrierID = $this->barrierId + 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块是不是也放到上下文里面去会更好

@PandaLIU-1111 PandaLIU-1111 merged commit a7e4390 into dtm-php:master Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants