Skip to content

Commit

Permalink
(cloud-merge) Fix nullptr bacause don't init tablet
Browse files Browse the repository at this point in the history
  • Loading branch information
Lchangliang committed Apr 25, 2024
1 parent 3034ac3 commit 81319a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions be/src/io/cache/block_file_cache_downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ void FileCacheBlockS3Downloader::download_file_cache_block(std::vector<FileCache
}
}
};
CloudTabletSPtr tablet;
auto res = _engine.tablet_mgr().get_tablet(meta.tablet_id(), false);
if (!res.has_value()) {
LOG_WARNING("Failed to find tablet {}", meta.tablet_id()).error(res.error());
return;
}
auto id_to_rowset_meta_map = tablet->tablet_meta()->snapshot_rs_metas();
auto id_to_rowset_meta_map = res.value()->tablet_meta()->snapshot_rs_metas();
if (auto iter = id_to_rowset_meta_map.find(meta.rowset_id());
iter != id_to_rowset_meta_map.end()) {
UInt128Wrapper cache_key = BlockFileCache::hash(meta.file_name());
Expand Down

0 comments on commit 81319a5

Please sign in to comment.