From: Gavin K. (JIRA) <no...@at...> - 2006-03-30 05:18:15
|
Check the second-level cache before adding a PK to a batch fetch ---------------------------------------------------------------- Key: HHH-1617 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 Project: Hibernate3 Type: Improvement Components: core Reporter: Gavin King BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-03-30 07:46:35
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22649 ] Emmanuel Bernard commented on HHH-1617: --------------------------------------- But we still need to limit the number of checked + added elements to batch-size, otherwise we could possibly restore all the 2nd level cached objects > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Gavin K. (JIRA) <no...@at...> - 2006-03-30 08:01:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22650 ] Gavin King commented on HHH-1617: --------------------------------- I'm not saying actually *load* the objects in the 2nd level cache. Just peek into the cache to see if they are there. > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Karl B. (JIRA) <no...@at...> - 2006-04-17 13:17:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22752 ] Karl Baum commented on HHH-1617: -------------------------------- I was looking into adding the logic for peeking into the cache within BatchFetchQueue.getEntityBatch and I ran into one problem. When fetching objects from the cache within DefaultLoadEventListener the LockMode is used to verify if we should be checking the cache versus doing a lookup in the database. final boolean useCache = persister.hasCache() && source.getCacheMode().isGetEnabled() && event.getLockMode().lessThan(LockMode.READ); My issue is I do not know where to get the LockMode for each EntityKey within BatchFetchQueue's batchLoadableEntityKeys. Am I missing something obvious? Thanks. -karl > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-04-20 15:42:28
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22793 ] Steve Ebersole commented on HHH-1617: ------------------------------------- I don't understand what you are asking. The LoadEvent defines a LockMode which by default is LockMode.NONE (which is lessThan LockMode.READ). Or are you asking about in the code deciding whether to exclude a particular key from the batch load? It is irrelevant there. Either the key represents a proxy (and therefore LockMode.NONE by definition) or the entity is already loaded and should not be in the set of keys you are processing in getEntityBatch() > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Karl B. (JIRA) <no...@at...> - 2006-04-20 20:44:29
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22799 ] Karl Baum commented on HHH-1617: -------------------------------- I was asking about the code deciding whether to exclude a particular key from the batch load. So you're saying at the point of batch loading we already know we have LockMode.NONE and therefore we can look in the cache. That makes sense. Thanks. -karl > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 21:20:23
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=all ] Steve Ebersole closed HHH-1617: ------------------------------- Fix Version: 3.2.0 Resolution: Fixed Assign To: Steve Ebersole Done for both entity and collection batches. Although see HHH-1775 for follow-on for collection batches > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |