[all-commits] [llvm/llvm-project] 983861: [CAS] Split on-disk CAS validate-if-needed into va...

Steven Wu via All-commits all-commits at lists.llvm.org
Tue Sep 29 11:20:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98386130ab0009ffea4b24ef1b3502747a7b8699
      https://github.com/llvm/llvm-project/commit/98386130ab0009ffea4b24ef1b3502747a7b8699
  Author: Steven Wu <stevenwu at apple.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M llvm/include/llvm/CAS/BuiltinUnifiedCASDatabases.h
    M llvm/include/llvm/CAS/OnDiskCASLogger.h
    M llvm/include/llvm/CAS/UnifiedOnDiskCache.h
    M llvm/include/llvm/CAS/ValidationResult.h
    M llvm/lib/CAS/BuiltinUnifiedCASDatabases.cpp
    M llvm/lib/CAS/OnDiskCASLogger.cpp
    M llvm/lib/CAS/OnDiskCommon.h
    M llvm/lib/CAS/UnifiedOnDiskCache.cpp
    M llvm/test/tools/llvm-cas/logging.test
    M llvm/test/tools/llvm-cas/validation.test
    M llvm/tools/llvm-cas/Options.td
    M llvm/tools/llvm-cas/llvm-cas.cpp
    M llvm/unittests/CAS/OnDiskCommonUtils.h
    M llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp

  Log Message:
  -----------
  [CAS] Split on-disk CAS validate-if-needed into validation and recovery (#226291)

Split validate-if-needed into two steps: an in-process validation and a
separate recovery. Validation marks the validation file as pending
before validating and records the boot time only on success, so a
validation that fails or crashes is detected by recovery and not
skipped by the next validation. Recovery only happens while validation
is pending, so concurrent recoveries after the same failure recover
once.

llvm-cas now drives out-of-process validation itself: it re-executes
itself with -in-process, forwards the output, and recovers if the child
fails or crashes and -allow-recovery is given. When recovering, the
validation error is only printed with -verbose. The library APIs no
longer take an llvm-cas path.


  Commit: 841433da7862a29bc1688ce7960c7ee349fa2973
      https://github.com/llvm/llvm-project/commit/841433da7862a29bc1688ce7960c7ee349fa2973
  Author: Steven Wu <stevenwu at apple.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M llvm/include/llvm-c/CAS/PluginAPI_functions.h
    M llvm/include/llvm-c/CAS/PluginAPI_types.h
    M llvm/include/llvm/CAS/ObjectStore.h
    M llvm/lib/CAS/PluginAPI.h
    M llvm/lib/CAS/PluginAPI_functions.def
    M llvm/lib/CAS/PluginCAS.cpp
    M llvm/test/CMakeLists.txt
    M llvm/test/lit.site.cfg.py.in
    M llvm/test/tools/llvm-cas/lit.local.cfg
    A llvm/test/tools/llvm-cas/plugin-validation-crash.test
    A llvm/test/tools/llvm-cas/plugin-validation.test
    M llvm/tools/libCASPluginTest/libCASPluginTest.cpp
    M llvm/tools/libCASPluginTest/libCASPluginTest.exports
    M llvm/tools/llvm-cas/Options.td
    M llvm/tools/llvm-cas/llvm-cas.cpp
    M llvm/unittests/CAS/PluginCASTest.cpp

  Log Message:
  -----------
  [CAS] Support validation and recovery for plugin CAS in llvm-cas (#227056)

Add the -fcas-plugin-path and -fcas-plugin-option options to llvm-cas,
and optional llcas_cas_validate_if_needed() and
llcas_cas_recover_ondisk_data() functions to the plugin API, exposed
via cas::validatePluginCASDatabasesIfNeeded() and
cas::recoverPluginCASDatabases(). Implement them, along with
llcas_cas_validate() and llcas_actioncache_validate(), in
libCASPluginTest and make the plugin available to lit tests.


Compare: https://github.com/llvm/llvm-project/compare/c0a3f49f1ca7...841433da7862

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list