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/06/12 08:26:27 UTC

[GitHub] [servicecomb-pack] pengyu0929 commented on issue #479: 向TxEvent表中插入时,为什么将surrogateId初始化为-1?

pengyu0929 commented on issue #479: 向TxEvent表中插入时,为什么将surrogateId初始化为-1?
URL: https://github.com/apache/servicecomb-pack/issues/479#issuecomment-501172491
 
 
   当alpha接收到omega的消息时,会将消息解析为TxEvent,在初始化时为什么将surrogateId设置为-1,这就导致只执行EntityManager.merge(),将entity交给EntityManager管理,之后都将entity和EntityManager缓存中的数据和表中的数据进行比较,这样严重影响了性能。
   我的理解是:alpha接收到消息就应该执行EntityManager.persist(),直接保存。
   我想知道你们这样做的目的是什么?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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