Page MenuHomePhabricator

packaging: enable rust extensions on centos
AcceptedPublic

Authored by Mathiasdm on Wed, Nov 11, 4:03 PM.

Details

Reviewers
Alphare
pulkit
Group Reviewers
hg-reviewers
Summary

Test on CentOS 7, repository with ~170000 tracked files,

no untracked files:

10 runs with this enabled:

  • Run #0 time: 0.6519973278045654
  • Run #1 time: 0.6933724880218506
  • Run #2 time: 0.7512078285217285
  • Run #3 time: 0.7517638206481934
  • Run #4 time: 0.5966529846191406
  • Run #5 time: 0.5960886478424072
  • Run #6 time: 0.5940573215484619
  • Run #7 time: 0.5963726043701172
  • Run #8 time: 0.6048009395599365
  • Run #9 time: 0.603604793548584

10 runs without this enabled:

  • Run #0 time: 2.127584457397461
  • Run #1 time: 2.066192865371704
  • Run #2 time: 2.0831892490386963
  • Run #3 time: 2.077716588973999
  • Run #4 time: 2.07608962059021
  • Run #5 time: 2.072899341583252
  • Run #6 time: 2.094369888305664
  • Run #7 time: 2.067504644393921
  • Run #8 time: 2.069610834121704
  • Run #9 time: 2.0567898750305176

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Mathiasdm created this revision.Wed, Nov 11, 4:03 PM

Are the Rust extensions considered stable? I'm honestly unsure. I'd love to ship these. But I'd like confirmation from the people maintaining them before we sign off.

Raphael should probably chime in, but as a data point, for us, all installations use rust. And they will have to, when we enable persistent-nodemap soon.
The likelihood of bug and performance bugs is probably higher than without rust, for conditions not covered by tests. That being said, I remember only two bugs from the past 6 months, and they were fairly obscure (type error on linux on filesystems that don't respect exec bits, occasional spurious failure in hg clean when it races on the filesystem with something).

Alphare accepted this revision.Fri, Nov 13, 5:22 AM
Alphare added a subscriber: Alphare.

I'm glad to see this patch!

As Valentin said, the extensions are of course less battle-tested than the Python+C code, but they have had a fair amount of user testing by now. The Rust code is gated (in Python code) to only be triggered in supported contexts, if that worried you.

I currently know of one (annoying, but mostly harmless) issue in concurrent contexts I intend to look into today, but that shouldn't deter you from using this code.

Now that Gentoo users have the Rust extensions advertized to them and others like you are starting to push for them, we'll probably need to add support for Rust config in the near future to give a more fined-grained access to them, but that's another discussion.

One thing to be careful of though is the version of Rust has to be at least 1.41.0. It may still work for older versions (like 1.34.2), but they will break in the future for any versions lower than our current MSRV.

Rust on CentOS 7 is 1.47.0, if I'm not mistaken.
Could the MSRV be checked automatically in the build of the rust extensions? (separate from this changeset, but might be useful, @Alphare )

Rust on CentOS 7 is 1.47.0, if I'm not mistaken.

Cool

Could the MSRV be checked automatically in the build of the rust extensions? (separate from this changeset, but might be useful, @Alphare )

I was simply mentioning this as a caution, but I think that we should let old compilers compile if they can, and that the MSRV should only be a "backwards-compat guarantee", not a hard limit.

pulkit accepted this revision.Sat, Nov 21, 2:41 AM
pulkit added a subscriber: pulkit.

From the discussion above, it seems to me that rust extensions are well tested (not battle-tested though). They are used at Jane Street and Gentoo users also have them advertised. Hence I am +1 on pushing this patch and will push in 3-4 days if I don't hear any concerns.

This revision is now accepted and ready to land.Sat, Nov 21, 2:41 AM