Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
HAWQ-1831. fix core issue when metadatacache disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ztao1987 committed Feb 23, 2022
1 parent ee9cdc9 commit cfb3a72
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/backend/cdb/cdbdatalocality.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,8 +1442,8 @@ fetch_hdfs_data_block_location(char *filepath, int64 len, int *block_num,
*hit_ratio = 0.0;
return NULL;
}
BlockLocation *locations;
HdfsFileInfo *file_info;
BlockLocation *locations = NULL;
HdfsFileInfo *file_info = NULL;
//double hit_ratio;
uint64_t beginTime;
beginTime = gettime_microsec();
Expand All @@ -1461,7 +1461,12 @@ fetch_hdfs_data_block_location(char *filepath, int64 len, int *block_num,
}
DestroyHdfsFileInfo(file_info);
} else {
locations = HdfsGetFileBlockLocations(filepath, len, block_num);
BlockLocation *hdfs_locations = HdfsGetFileBlockLocations(filepath, len, block_num);
locations = CreateHdfsFileBlockLocations(hdfs_locations, *block_num);
if (hdfs_locations)
{
HdfsFreeFileBlockLocations(hdfs_locations, *block_num);
}
}
if (debug_print_split_alloc_result) {
uint64 endTime = gettime_microsec();
Expand Down

0 comments on commit cfb3a72

Please sign in to comment.