New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Thrift in SimpleOpStore #700
Conversation
9b7b089
to
3882777
Compare
27ba2e8
to
76e2643
Compare
ea3a114
to
34b21a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hand-written hash impls seem verbose, error-prone, and high risk. Should we pursue automating them with a derive macro in immediate future work? I'd be happy to take that on, but it would likely result in different hashes. Prior ecosystem discussion in RustCrypto/utils#2.
f254556
to
da38602
Compare
Yeah, I agree. I feel much better about them with the change to include the length as prefix, though. Now the pattern is clearer.
Changing the hashes again would be unfortunate, so if we're going to write macros for generating hashes, I think we should let this PR wait. We're going to have to do the same migration for the native commit backend. If you wrote macros for generating content hashes, that could be used there too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll try to bang out a proc macro for the hashing within the next few days (unless it's not worth the delay).
Thanks! I think it's fine to wait. |
da38602
to
9c59640
Compare
In order to allow building jj inside of Google, our Protobuf team doesn't want to us to use a Google-unsupported implementation. Since there is no supported implementation in Rust, we have to migrate off of Protobufs. I'm starting with the operation store. This commit moves the current implementation to a separate file so it can easily be disabled by a Caargo feature.
9c59640
to
444dca6
Compare
This is now ready for review again! |
Eh, I forgot to actually use the new content hashing in the new |
444dca6
to
25a79ea
Compare
Alright, hopefully it looks better now. |
25a79ea
to
6b90c00
Compare
As mentioned in the previous commit, we need to remove the Protobuf dependency in order to be allowed to import jj into Google's repo. This commit makes `SimpleOpStore` store its data using Thrift instead of Protobufs. It also adds automatic upgrade of existing repos. The upgrade process took 18 s in my repo, which has 22k operations. The upgraded storage uses practically the same amount of space. `jj op log` (the full outut) in my repo slowed down from 1.2 s to 3.4 s. Luckily that's an uncommon operation. I couldn't measure any difference in `jj status` (loading a single operation).
6b90c00
to
f74387c
Compare
Checklist
If applicable:
CHANGELOG.md