Skip to content

[Bug]: File-per-key storage fails to initialize when eviction is disabled #2981

Description

@feichai0017

Bug Report

On current main , the file-per-key backend cannot complete FileStorage::Init() when MOONCAKE_OFFLOAD_ENABLE_EVICTION=false.

The call order is:

  1. storage_backend_->Init()
  2. FileStorage::IsEnableOffloading()
  3. storage_backend_->ScanMeta()

For StorageBackendAdaptor, IsEnableOffloading() returns INTERNAL_ERROR while meta_scanned_ is false when eviction is disabled. The first metadata scan is later in FileStorage::Init(), so initialization returns before it can ever establish the counters required by IsEnableOffloading().

The adaptor unit test already documents that ScanMeta() must run before IsEnableOffloading() in this configuration, but the production initialization path does the reverse.

Expected behavior

File-per-key storage should initialize successfully with eviction disabled, reconstruct existing usage before enabling new offloads, and register recovered LOCAL_DISK metadata with the master.

Before submitting...

  • Searched existing issues and open PRs for this initialization failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions