Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 664f16c8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 07f97722 d02b7441
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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>(
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

+4 −2
Original line number Diff line number Diff line
@@ -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) {
            if (io_state_ == MERGE_IO_TRANSITION::MERGE_FAILED) {
                SNAP_LOG(ERROR) << "Wait for merge ready failed: " << io_state_;
            }
            return false;
        }
        return true;