Merge "snapuserd: Change error message to verbose" into main

This commit is contained in:
Treehugger Robot 2024-11-15 19:42:17 +00:00 committed by Gerrit Code Review
commit 664f16c830
3 changed files with 5 additions and 4 deletions

View file

@ -582,7 +582,6 @@ bool MergeWorker::Run() {
pthread_setname_np(pthread_self(), "MergeWorker");
if (!snapuserd_->WaitForMergeBegin()) {
SNAP_LOG(ERROR) << "Merge terminated early...";
return true;
}
auto merge_thread_priority = android::base::GetUintProperty<uint32_t>(

View file

@ -702,7 +702,7 @@ bool ReadAhead::ReadAheadIOStart() {
// window. If there is a crash during this time frame, merge should resume
// based on the contents of the scratch space.
if (!snapuserd_->WaitForMergeReady()) {
SNAP_LOG(ERROR) << "ReadAhead failed to wait for merge ready";
SNAP_LOG(VERBOSE) << "ReadAhead failed to wait for merge ready";
return false;
}

View file

@ -202,7 +202,7 @@ bool SnapshotHandler::WaitForMergeBegin() {
cv.wait(lock, [this]() -> bool { return MergeInitiated() || IsMergeBeginError(io_state_); });
if (IsMergeBeginError(io_state_)) {
SNAP_LOG(ERROR) << "WaitForMergeBegin failed with state: " << io_state_;
SNAP_LOG(VERBOSE) << "WaitForMergeBegin failed with state: " << io_state_;
return false;
}
@ -276,7 +276,9 @@ bool SnapshotHandler::WaitForMergeReady() {
if (io_state_ == MERGE_IO_TRANSITION::MERGE_FAILED ||
io_state_ == MERGE_IO_TRANSITION::MERGE_COMPLETE ||
io_state_ == MERGE_IO_TRANSITION::IO_TERMINATED) {
SNAP_LOG(ERROR) << "Wait for merge ready failed: " << io_state_;
if (io_state_ == MERGE_IO_TRANSITION::MERGE_FAILED) {
SNAP_LOG(ERROR) << "Wait for merge ready failed: " << io_state_;
}
return false;
}
return true;