You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
⚠️ **This diff was generated by M-O** -- an AI code-quality bot that
produces one small, surgical Rust cleanup per day in fbcode/eden/mononoke.
walle_clean
location_to_hg_changeset_id uses future::try_join_all to convert N bonsai
changeset IDs to Hg IDs after resolving a commit-graph location. try_join_all
polls all N futures concurrently with no bound.
The count parameter comes from the client's commit_location_to_hash request
and can represent hundreds of changesets (Sapling's segment-based protocol
sends linear segments of 100-500+ entries). Unbounded fan-out on user-controlled
N risks saturating the derived-data SQL store and is flagged as a production
anti-pattern (S493741, S552025).
Replace try_join_all with stream::iter(...).buffered(100) to cap in-flight
derivation calls at 100. buffered (not buffer_unordered) preserves the
ordering of the result vec, matching the original semantics. Remove the now-
unused futures::future import.
Differential Revision: D103610505
fbshipit-source-id: 08e52faed4af38c45157277d55589cc3758d0f1c
0 commit comments