简体   繁体   English

即使在休眠ehcache命中后,数据库也会“提交”

[英]Database 'commits' even after hibernate ehcache hit

I am seeing commits to the database after getting a cache hit from ehcache. 从ehcache获取缓存命中后,我看到对数据库的提交。

When I look in the MYSQL SQL query logs I see this: 当我查看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

This is obviously a big performance hit. 这显然是对性能的重大影响。 Any ideas what I have configured wrong? 任何想法我配置错误吗?

I solved this eventually. 我最终解决了这个问题。 The answer is here in the docs: 答案在文档中:

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

Using the LazyConnectionDataSourceProxy stopped the commits. 使用LazyConnectionDataSourceProxy停止了提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM