Skip to content
Permalink
Browse files
[NO ISSUE][STO] Read Only Node's Partitions Resources on Cleanup
- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- When performing global storage clean up, read only the local
 resources that belong to the node's partitions.

Change-Id: Ibeb18b70024d9120f039423b1506d54298070d79
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/16063
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
  • Loading branch information
mhubail committed Apr 28, 2022
1 parent 47d7772 commit 4946635f10d56251f40fa9496611bad448c30497
Showing 1 changed file with 3 additions and 4 deletions.
@@ -57,13 +57,12 @@ public void handle(INcApplicationContext appContext) throws HyracksDataException
INCMessageBroker broker = (INCMessageBroker) appContext.getServiceContext().getMessageBroker();
PersistentLocalResourceRepository localResourceRepository =
(PersistentLocalResourceRepository) appContext.getLocalResourceRepository();
Map<Long, LocalResource> localResources = localResourceRepository.loadAndGetAllResources();
Set<Integer> nodePartitions = appContext.getReplicaManager().getPartitions();
Map<Long, LocalResource> localResources = localResourceRepository.getResources(lr -> true, nodePartitions);
for (LocalResource resource : localResources.values()) {
DatasetLocalResource lr = (DatasetLocalResource) resource.getResource();
if (!nodePartitions.contains(lr.getPartition())
|| MetadataIndexImmutableProperties.isMetadataDataset(lr.getDatasetId())) {
// skip replica partitions and metadata indexes
if (MetadataIndexImmutableProperties.isMetadataDataset(lr.getDatasetId())) {
// skip metadata indexes
continue;
}
if (!validDatasetIds.contains(lr.getDatasetId())) {

0 comments on commit 4946635

Please sign in to comment.