Yingyi Bu has posted comments on this change.

Change subject: Allow lazy loading for persistent local resources
......................................................................


Patch Set 5:

(5 comments)

It looks all the resources are still loaded at the very beginning into a 
temporary map in getAndLoadAllResources(...).  
I looked at the callers --- it seems the callers are only interested in the max 
resource id instead of the whole map.
Am I right?

Detailed comments are in the code.

https://asterix-gerrit.ics.uci.edu/#/c/344/5/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/TempDatasetPrimaryIndexModificationOperationCallbackFactory.java
File 
asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/TempDatasetPrimaryIndexModificationOperationCallbackFactory.java:

Line 68:     
trim space.


https://asterix-gerrit.ics.uci.edu/#/c/344/5/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
File 
asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java:

Line 48:     private final Cache<String, LocalResource> resourcesCache;
s/resourcesCache/resourceCache?


Line 205:     public HashMap<Long, LocalResource> loadAndGetAllResources() 
throws HyracksDataException {
s/public/private?
By looking at the callers of this method, I guess you don't need to load 
everything into the temporary map resourcesMap, but just need to return the max 
Id which is a long here.  Am I right?


Line 232:             //#. load all local resources. 
trim space.


Line 270:         return new ArrayList<LocalResource>(resourcesMap.values());
Change the method signature here?
Based on my understanding, it is only called in the ResourceIdFactoryProvider 
which is just to get the largest resource Id.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/344
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I48b9260a3280750145f6ddb3783673a299055910
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Young-Seok Kim <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to