Skip to content

[Store] Replace LOG(FATAL) with LOG(ERROR) for missing MC_CXL_DEV_SIZE#6

Open
stmatengss wants to merge 1 commit intohemist/cxl-level-storefrom
fix/fatal-to-error-cxl-dev-size
Open

[Store] Replace LOG(FATAL) with LOG(ERROR) for missing MC_CXL_DEV_SIZE#6
stmatengss wants to merge 1 commit intohemist/cxl-level-storefrom
fix/fatal-to-error-cxl-dev-size

Conversation

@stmatengss
Copy link
Copy Markdown

Problem

Two locations in real_client.cpp call LOG(FATAL) when MC_CXL_DEV_SIZE is not set:

} else {
    LOG(FATAL) << "MC_CXL_DEV_SIZE not set";  // aborts process
    return tl::unexpected(...);               // unreachable
}

A missing env var is a user configuration error and should not crash the process.

Fix

Replace both LOG(FATAL) calls with LOG(ERROR). The return tl::unexpected(ErrorCode::INVALID_PARAMS) that follows then executes correctly as a graceful error return.

Impact

  • Missing MC_CXL_DEV_SIZE now returns INVALID_PARAMS instead of crashing
  • No change to behavior when env var is set correctly
  • No change to RAM/TCP/RDMA paths

Two code paths in mp_setup_internal and setup_internal called LOG(FATAL)
when the MC_CXL_DEV_SIZE environment variable was not set. LOG(FATAL)
terminates the process unconditionally — inappropriate for a user
configuration error that can be reported gracefully.

Replace both LOG(FATAL) calls with LOG(ERROR) so the error is returned
via the existing tl::unexpected(ErrorCode::INVALID_PARAMS) path without
crashing the process.
@stmatengss stmatengss requested review from XucSh and YiXR as code owners April 22, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant