Murtadha Hubail has posted comments on this change. Change subject: ASTERIXDB-1058: make Asterix compatible with lazy LSM memory allocation ......................................................................
Patch Set 10: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/408/10/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java File asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java: Line 248: DatasetLifecycleManager datasetLifecycleManager = (DatasetLifecycleManager) txnSubsystem > How do we know this cast is safe (and why do we need it)? As you might have noticed, I removed the method getIndex(datasetId, resourceId) which is used in REDO and UNDO from the interface IIndexLifecycleManager. It clearly doesn't belong there because it is using a parameter called datasetId. The downcast is needed to call this method in DatasetLifecycleManager since it is not part of the interface anymore. Since this is Asterix's RecoveryManager and Asterix's IndexLifecycleMaanger is of type DatasetLifecycleManager, it is (kinda) safe. However, I can add a new interface IDatasetLifecycleManager which extends IIndexLifecycleManager, and DatasetLifecycleManager implements. Then modify IAsterixAppRuntimeContextProvider::getIndexLifecycleManager() to return IDatasetLifecycleManager, then we won't need this downcast. What do you think? -- To view, visit https://asterix-gerrit.ics.uci.edu/408 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4ea1eb129fe3043d43b077473dc29d17a97dfcc2 Gerrit-PatchSet: 10 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: Michael Carey <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-Reviewer: Young-Seok Kim <[email protected]> Gerrit-HasComments: Yes
