Skip to content

Parallel Stache warming produces inconsistent Stache _indexes #13261

@o1y

Description

@o1y

Bug description

After enabling the new parallel Stache warming (introduced in v5.70.0), the generated Stache _indexes become inconsistent between runs and differ from the output produced in the versions before the PR.

How to reproduce

  • Enable parallel Stache warming (e.g. parallel_processing = true, concurrency_driver = fork) on 5.70.0.
  • Run the Stache warm command and check storage/framework/cache/data/stache/indexes/**/_indexes

v5.69.0:
Indexes are not changing when running the stache warm command multiple times.

9999999999a:1:{i:0;s:4:"path";}

v5.70.0:
Indexes are changing when running the stache warm command multiple times.

9999999999a:2:{i:0;s:4:"path";i:1;s:2:"id";}

Logs

Environment

5.70.0

Installation

Fresh statamic/statamic site via CLI

Additional details

Also it seems parallel processing does not improve stache warm performance (I don't see any significant difference in all of my projects). Because most entries live in collections, and collections are warmed in a single process (one store per process), the parallelization provides little / no real concurrency. The smaller stores finish quickly, leaving most cores idle while the main collection store warms sequentially..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions