snapuserd: Change error message to verbose

These error logs gets printed even when I/O gracefully
terminates which might be confusing.

Bug: 377819507
Test: Build
Change-Id: I93d4ec2203566e75195215babc0042370be43ccb
Signed-off-by: Akilesh Kailash <akailash@google.com>
This commit is contained in:
Akilesh Kailash 2024-11-14 11:17:32 -08:00
parent 7adba5989c
commit d02b74411b
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;