【问题标题】:Database 'commits' even after hibernate ehcache hit即使在休眠 ehcache 命中后,数据库也“提交”
【发布时间】:2013-07-30 16:24:54
【问题描述】:

在从 ehcache 获得缓存命中后,我看到了对数据库的提交。

当我查看 MYSQL SQL 查询日志时,我看到:

130730 17:20:23    53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
130730 17:20:24    53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit
                   53 Query commit

这显然对性能造成了很大的影响。有什么想法我配置错了吗?

【问题讨论】:

  • “来自 ehcache 的缓存命中”是什么意思?请在这些提交发生之前分享您正在进行的休眠查询?另外,您确定这些提交不是来自该应用程序中发生的其他一些操作...谢谢。

标签: hibernate ehcache


【解决方案1】:

我最终解决了这个问题。答案在文档中:

http://terracotta.org/documentation/3.7.4/enterprise-ehcache/distributed-hibernate#empty-db-connections

使用 LazyConnectionDataSourceProxy 停止提交。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-05
    • 2017-03-28
    • 2015-03-07
    • 2017-03-11
    • 2012-12-11
    相关资源
    最近更新 更多