aboutsummaryrefslogtreecommitdiff
path: root/icing/file/posting_list/flash-index-storage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'icing/file/posting_list/flash-index-storage.cc')
-rw-r--r--icing/file/posting_list/flash-index-storage.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/icing/file/posting_list/flash-index-storage.cc b/icing/file/posting_list/flash-index-storage.cc
index 21fea8a..2198d2c 100644
--- a/icing/file/posting_list/flash-index-storage.cc
+++ b/icing/file/posting_list/flash-index-storage.cc
@@ -75,7 +75,11 @@ FlashIndexStorage::ReadHeaderMagic(const Filesystem* filesystem,
FlashIndexStorage::~FlashIndexStorage() {
if (header_block_ != nullptr) {
- FlushInMemoryFreeList();
+ libtextclassifier3::Status status = FlushInMemoryFreeList();
+ if (!status.ok()) {
+ ICING_LOG(ERROR) << "Cannot flush in memory free list: "
+ << status.error_message();
+ }
PersistToDisk();
}
}
@@ -488,7 +492,7 @@ libtextclassifier3::Status FlashIndexStorage::FreePostingList(
ICING_ASSIGN_OR_RETURN(IndexBlock block,
GetIndexBlock(holder.id.block_index()));
if (block.posting_list_bytes() == max_posting_list_bytes()) {
- block.SetNextBlockIndex(kInvalidBlockIndex);
+ ICING_RETURN_IF_ERROR(block.SetNextBlockIndex(kInvalidBlockIndex));
}
uint32_t posting_list_bytes = block.posting_list_bytes();