Repository navigation
fix(store-dir): keep the per-file store index in index/ - #16879
Conversation
The per-file index lived under package-index/. pnpm v10 kept its per-file index under index/, so name the v11 directory the same way; the v10 one lived in v10/, so the two never share a directory. Nothing released wrote package-index/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The reviewed changes consistently use the renamed ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoUse index/ for the per-file store index
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16879 +/- ##
==========================================
- Coverage 92.58% 92.58% -0.01%
==========================================
Files 1697 1697
Lines 220865 220865
==========================================
- Hits 204493 204483 -10
- Misses 16372 16382 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked and injected workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8691044202800002,
"stddev": 0.1472643620371812,
"median": 2.88352356608,
"user": 2.36857446,
"system": 2.3441554800000004,
"min": 2.68396795258,
"max": 3.13168712958
},
{
"command": "pacquet@main",
"mean": 2.59722220018,
"stddev": 0.14931384087922459,
"median": 2.62994861758,
"user": 1.83459896,
"system": 1.8520044799999997,
"min": 2.33832078858,
"max": 2.8338603785800003
},
{
"command": "pnpr@HEAD",
"mean": 1.47314882798,
"stddev": 0.10451582029105329,
"median": 1.44881867908,
"user": 1.4853850599999998,
"system": 1.4107947799999998,
"min": 1.35097175958,
"max": 1.6403238275799998
},
{
"command": "pnpr@main",
"mean": 1.48291080978,
"stddev": 0.09632895575984662,
"median": 1.4799228765799999,
"user": 1.4817309599999997,
"system": 1.4227621799999999,
"min": 1.37809862958,
"max": 1.62145006258
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.35218864616,
"stddev": 0.024309823997514128,
"median": 0.34680270116,
"user": 0.41402614,
"system": 0.7746753,
"min": 0.32598517016,
"max": 0.40343839016
},
{
"command": "pacquet@main",
"mean": 0.26444543016,
"stddev": 0.014316267053707914,
"median": 0.26487463866,
"user": 0.33083594000000005,
"system": 0.5843609,
"min": 0.24242279816,
"max": 0.28854231716
},
{
"command": "pnpr@HEAD",
"mean": 0.29845447296,
"stddev": 0.03257493747026238,
"median": 0.30147692966,
"user": 0.32750204,
"system": 0.6082414,
"min": 0.24759122316000004,
"max": 0.36168663616
},
{
"command": "pnpr@main",
"mean": 0.32753925186,
"stddev": 0.017725146161021187,
"median": 0.32630065916,
"user": 0.35088044,
"system": 0.67839,
"min": 0.29546788816,
"max": 0.35160678416
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.41442043032000003,
"stddev": 0.055319266071283096,
"median": 0.39002618282,
"user": 0.45478937999999997,
"system": 0.8066527199999998,
"min": 0.35940605632000006,
"max": 0.52996015232
},
{
"command": "pnpr@HEAD",
"mean": 0.46060552722,
"stddev": 0.05472681465333681,
"median": 0.45576373082000005,
"user": 0.52007328,
"system": 0.83689702,
"min": 0.38317005432000006,
"max": 0.58063653532
},
{
"command": "pacquet@main",
"mean": 0.38770963772000006,
"stddev": 0.02405170554172274,
"median": 0.38213029332000004,
"user": 0.43811197999999996,
"system": 0.7922330199999998,
"min": 0.35355237132000006,
"max": 0.43629920532000005
},
{
"command": "pacquet@HEAD",
"mean": 0.37407463852,
"stddev": 0.03539949174996176,
"median": 0.38212249882000004,
"user": 0.43968068000000005,
"system": 0.7612153199999999,
"min": 0.30373095232,
"max": 0.41676897632000004
}
]
}
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.015461617751250007,
"stddev": 0.004027362505795153,
"median": 0.01432311952,
"user": 0.008266996250000002,
"system": 0.008575904125,
"min": 0.010403483520000001,
"max": 0.029794469520000002
},
{
"command": "pacquet@main",
"mean": 0.014317242926639,
"stddev": 0.0030428813685457433,
"median": 0.01341135952,
"user": 0.00799686116182573,
"system": 0.007673574688796682,
"min": 0.00965001652,
"max": 0.024945319520000002
},
{
"command": "pnpr@HEAD",
"mean": 0.013089023088627449,
"stddev": 0.002054963691537389,
"median": 0.012944402520000002,
"user": 0.007411194901960785,
"system": 0.006911537058823527,
"min": 0.009115731520000002,
"max": 0.02465566552
},
{
"command": "pnpr@main",
"mean": 0.013547717403720932,
"stddev": 0.002114462422700244,
"median": 0.01298351552,
"user": 0.00783792604651163,
"system": 0.006988778139534882,
"min": 0.010051401520000001,
"max": 0.022755132520000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01758139993974684,
"stddev": 0.0033113985379391486,
"median": 0.017543927060000002,
"user": 0.00940863518987342,
"system": 0.009746255189873414,
"min": 0.01111019906,
"max": 0.029796542060000004
},
{
"command": "pacquet@main",
"mean": 0.011344864711315787,
"stddev": 0.0028727855738145255,
"median": 0.01020462206,
"user": 0.006604130526315789,
"system": 0.005730031052631579,
"min": 0.00793727106,
"max": 0.01820932906
},
{
"command": "pnpr@HEAD",
"mean": 0.01060689215638554,
"stddev": 0.0011224103263676561,
"median": 0.01055300706,
"user": 0.005883219196787146,
"system": 0.005868110522088356,
"min": 0.00825902106,
"max": 0.014753269060000001
},
{
"command": "pnpr@main",
"mean": 0.010611911049743584,
"stddev": 0.0009326299888031308,
"median": 0.01057277806,
"user": 0.006082891794871796,
"system": 0.00565698041025641,
"min": 0.00866204206,
"max": 0.01382978706
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8393805582000002,
"stddev": 0.07266596367067402,
"median": 2.8545481205000005,
"user": 2.8666960599999998,
"system": 2.14537772,
"min": 2.716300872,
"max": 2.9377840500000003
},
{
"command": "pacquet@main",
"mean": 3.0123184842000006,
"stddev": 0.1042116589267419,
"median": 3.0308267565,
"user": 3.25594306,
"system": 2.4223346199999995,
"min": 2.7574989270000003,
"max": 3.1437982530000004
},
{
"command": "pnpr@HEAD",
"mean": 1.6093657545,
"stddev": 0.1169311484333111,
"median": 1.577284884,
"user": 1.5998337599999997,
"system": 1.6632004199999997,
"min": 1.491570455,
"max": 1.820397175
},
{
"command": "pnpr@main",
"mean": 1.6344674407,
"stddev": 0.15829543178554792,
"median": 1.600942531,
"user": 1.6072466599999995,
"system": 1.64015022,
"min": 1.467113713,
"max": 1.974773831
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5796772028,
"stddev": 0.05813134991848292,
"median": 0.5979419244,
"user": 0.78383594,
"system": 0.90255278,
"min": 0.46608837090000005,
"max": 0.6425786699
},
{
"command": "pacquet@main",
"mean": 0.4835174157,
"stddev": 0.02136918930106162,
"median": 0.4841612129,
"user": 0.66523014,
"system": 0.7914503799999999,
"min": 0.4418830019,
"max": 0.5192325329
},
{
"command": "pnpr@HEAD",
"mean": 0.31935116490000004,
"stddev": 0.027616966219288223,
"median": 0.31682391090000006,
"user": 0.28311854,
"system": 0.61782118,
"min": 0.28324498490000005,
"max": 0.3666112389
},
{
"command": "pnpr@main",
"mean": 0.33772654700000004,
"stddev": 0.00861997009882115,
"median": 0.3360388714,
"user": 0.3420349399999999,
"system": 0.64722538,
"min": 0.32522894490000004,
"max": 0.35748334190000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.89349376324,
"stddev": 0.082140882023168,
"median": 1.9017621077400002,
"user": 1.50680374,
"system": 1.3773492799999998,
"min": 1.78326678624,
"max": 2.06079363624
},
{
"command": "pacquet@main",
"mean": 1.93397450314,
"stddev": 0.032936363469989176,
"median": 1.93168952124,
"user": 1.56455804,
"system": 1.4560473799999998,
"min": 1.88928493724,
"max": 2.00492814224
},
{
"command": "pnpr@HEAD",
"mean": 0.45642408964000003,
"stddev": 0.027178529146980244,
"median": 0.45756041424000005,
"user": 0.46343563999999987,
"system": 0.8552406799999999,
"min": 0.41846375124,
"max": 0.50553413224
},
{
"command": "pnpr@main",
"mean": 0.4209467656400001,
"stddev": 0.012199682556774623,
"median": 0.41964441774000005,
"user": 0.42839773999999997,
"system": 0.8081888799999998,
"min": 0.39849493724,
"max": 0.44135115024000005
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27204806253999997,
"stddev": 0.020506311155712834,
"median": 0.27291609374000003,
"user": 0.26068876,
"system": 0.11115230000000001,
"min": 0.23860860074,
"max": 0.30185437074
},
{
"command": "pacquet@main",
"mean": 0.31112600124,
"stddev": 0.04078984302958831,
"median": 0.31398773473999997,
"user": 0.30390806000000004,
"system": 0.12274720000000001,
"min": 0.24778627774,
"max": 0.37328725474
},
{
"command": "pnpr@HEAD",
"mean": 0.10316146131142857,
"stddev": 0.007855605998124208,
"median": 0.10207348124000001,
"user": 0.040432367142857153,
"system": 0.01917982142857143,
"min": 0.09267230974000001,
"max": 0.12434806874000001
},
{
"command": "pnpr@main",
"mean": 0.1026852284707692,
"stddev": 0.0031170274974217406,
"median": 0.10202627724000002,
"user": 0.044101452307692315,
"system": 0.016394230769230765,
"min": 0.09703134474000001,
"max": 0.11016349774
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2227979066088889,
"stddev": 0.010069764883138176,
"median": 0.22537165172,
"user": 0.2302627311111111,
"system": 0.05138018,
"min": 0.20813237172000001,
"max": 0.23308875172000001
},
{
"command": "pacquet@main",
"mean": 0.2272913923866667,
"stddev": 0.013154670863050829,
"median": 0.22258242872000003,
"user": 0.22947973111111108,
"system": 0.05560284666666667,
"min": 0.20906716972000003,
"max": 0.24497320972000003
},
{
"command": "pnpm@HEAD",
"mean": 3.866001417608889,
"stddev": 0.27648173537442666,
"median": 3.8411113247200004,
"user": 6.014879286666666,
"system": 0.3785026244444445,
"min": 3.52078205472,
"max": 4.31572736272
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31522976174000006,
"stddev": 0.028253774058259493,
"median": 0.30953227924000004,
"user": 0.2515415,
"system": 0.12974435999999998,
"min": 0.27988759324,
"max": 0.35623711124
},
{
"command": "pacquet@main",
"mean": 0.31807359883999997,
"stddev": 0.04569875822077073,
"median": 0.32129269524000004,
"user": 0.25327029999999995,
"system": 0.13528126000000001,
"min": 0.26562106924,
"max": 0.38719565324000005
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.11620585186086958,
"stddev": 0.01656938480629736,
"median": 0.11658018260000001,
"user": 0.04630447217391303,
"system": 0.08063942956521739,
"min": 0.0887363696,
"max": 0.1460398686
},
{
"command": "pacquet@main",
"mean": 0.12011540081739129,
"stddev": 0.011447109463380619,
"median": 0.1166841086,
"user": 0.049424646086956514,
"system": 0.0811369947826087,
"min": 0.1058693626,
"max": 0.1418324746
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.59331668742,
"stddev": 0.2413912006861343,
"median": 4.516149672519999,
"user": 1.6682386999999999,
"system": 1.6111367399999998,
"min": 4.36905241102,
"max": 5.03012781102
},
{
"command": "pacquet@main",
"mean": 4.82396725282,
"stddev": 0.4430001321628566,
"median": 4.67048122602,
"user": 1.9810535999999999,
"system": 1.8817777399999998,
"min": 4.38596554402,
"max": 5.84706373202
},
{
"command": "pnpr@HEAD",
"mean": 5.00130310612,
"stddev": 0.7032936009230197,
"median": 4.93419505952,
"user": 2.87798,
"system": 2.71239414,
"min": 3.92802893102,
"max": 6.17758998502
},
{
"command": "pnpr@main",
"mean": 5.21437247282,
"stddev": 0.713697327320507,
"median": 4.9236119685199995,
"user": 2.9938633999999995,
"system": 2.94436064,
"min": 4.50594210802,
"max": 6.47498644402
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1907388299966667,
"stddev": 0.01278628066486356,
"median": 0.18810131408000003,
"user": 0.23593720333333335,
"system": 0.20681474666666663,
"min": 0.17052005558000002,
"max": 0.21312440858000004
},
{
"command": "pacquet@main",
"mean": 0.19240596188769235,
"stddev": 0.01665522584459601,
"median": 0.19356051858000003,
"user": 0.24425404307692306,
"system": 0.20258111846153842,
"min": 0.16390173858,
"max": 0.21979044558000002
},
{
"command": "pnpr@HEAD",
"mean": 0.2132456686709091,
"stddev": 0.018505691508660084,
"median": 0.20552702158000002,
"user": 0.2528734836363636,
"system": 0.2118809436363636,
"min": 0.18332992858000002,
"max": 0.24179802858000002
},
{
"command": "pnpr@main",
"mean": 0.19388915186571434,
"stddev": 0.013441030446212619,
"median": 0.19335824908000002,
"user": 0.21872233428571428,
"system": 0.20588307999999997,
"min": 0.17631976258,
"max": 0.21898051558000003
}
]
} |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
## Proposed Changes - **Bump `@pnpm/napi` to 12.13.0.** `pnpm-lock.yaml` changes only in the napi version entries. - 12.13.0 ships the engine changes for a store shared over a network filesystem, where the Rust engine was slower than pnpm v10 and two concurrent installs could corrupt the store index: - **`storeIndexFormat: files`** (pnpm/pnpm#16875, pnpm/pnpm#16879, pnpm/pnpm#16890): the store's package index as one file per package instead of the SQLite `index.db`, whose locking does not work across machines. Reads take no lock. Bit does not set it. The engine honours `PNPM_CONFIG_STORE_INDEX_FORMAT=files` in the environment or `storeIndexFormat: files` in the global pnpm config, and a store that already has a per-file index is detected on its own, whatever the setting says. - **Lockfile-reused subtrees stay out of the resolution warm-up** (pnpm/pnpm#16886). On a 5,100-package capsule install the engine resolved ~5,650 packages from registry metadata that the walk then took from the lockfile anyway, 22 s of a 28 s resolution. - **Store verification runs during resolution** when `enableModulesDir: false` (pnpm/pnpm#16888), with a package's files checked in parallel. On a network-filesystem store this removed a 19 s pause between resolution and fetching. - Installed with Bit 2.2.104 so the lockfile keeps the `overrides` form that #10787 writes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) — Claude Code (Fable 5.1) Co-authored-by: Claude Fable 5.1 <[email protected]>
Summary
Renames the directory of the per-file store index added in #16875 from
package-index/toindex/, the name pnpm v10 used for its per-file index. The v10 index lived in<store>/v10/index/and this one lives in<store>/v11/index/, so the two never share a directory.storeIndexFormat: fileshas not been released yet, so no store has apackage-index/directory to migrate, and the pending changeset does not name the directory.Squash Commit Body
Checklist
are implemented in every affected version.
🤖 Generated with Claude Code (Claude Opus 5.5)
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
indexdirectory instead ofpackage-index.