diff options
author | Tim Barron <tjbarron@google.com> | 2022-04-12 14:43:45 -0700 |
---|---|---|
committer | Tim Barron <tjbarron@google.com> | 2022-04-12 14:43:45 -0700 |
commit | 156c55e27d7a8fdf9c26e30dcbf09e97231efd68 (patch) | |
tree | 9c84d2510adbf430424c9244a16a92ab09ad73c7 /icing/store | |
parent | d5c9ae94052a0f2f1b9ddec9dbbe502bc4f11d54 (diff) | |
download | icing-156c55e27d7a8fdf9c26e30dcbf09e97231efd68.tar.gz |
Sync from upstream.
Descriptions:
======================================================================
Add some additional logging that will help diagnose b/218413237
======================================================================
Mark VerbatimTokenizer::ResetToTokenStartingAfter as 'override'.
======================================================================
Support dump function for SchemaStore
======================================================================
Bug: 218413237
Change-Id: I9efd1dd388cd510df15989c84a8577d4ba56ab3c
Diffstat (limited to 'icing/store')
-rw-r--r-- | icing/store/document-store.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/icing/store/document-store.cc b/icing/store/document-store.cc index a2ae5f9..8c8369c 100644 --- a/icing/store/document-store.cc +++ b/icing/store/document-store.cc @@ -431,7 +431,19 @@ libtextclassifier3::Status DocumentStore::RegenerateDerivedFiles( // Iterates through document log auto iterator = document_log_->GetIterator(); auto iterator_status = iterator.Advance(); + libtextclassifier3::StatusOr<int64_t> element_size = + document_log_->GetElementsFileSize(); + libtextclassifier3::StatusOr<int64_t> disk_usage = + document_log_->GetDiskUsage(); + if (element_size.ok() && disk_usage.ok()) { + ICING_VLOG(1) << "Starting recovery of document store. Document store " + "elements file size:" + << element_size.ValueOrDie() + << ", disk usage=" << disk_usage.ValueOrDie(); + } while (iterator_status.ok()) { + ICING_VLOG(2) << "Attempting to read document at offset=" + << iterator.GetOffset(); libtextclassifier3::StatusOr<DocumentWrapper> document_wrapper_or = document_log_->ReadProto(iterator.GetOffset()); |