sapling/eden/mononoke/bonsai_git_mapping
Yan Soares Couto 1592618cf4 Rename prepushrebase to in_critical_section and do it in the critical section
Summary:
This fixes a current bug in our landing logic: The `prepushrebase` call happens concurrently with fetching the bookmark value, which means we can't guarantee no more commits land before actually starting this pushrebase.

But some pushrebase hooks, like globalrev, depend on that. Because they calculate the `max_log_id`, which will change if more commits land.

This can lead to a race condition where we try to set the same globalrev for a commit. In our code, we fail when that happens, but if we're a little less careful it could cause inconsistency issues.

So let's make things clear by making it always happen after the critical section starts, and making that clear in the API.

Reviewed By: markbt

Differential Revision: D42805082

fbshipit-source-id: 78043761cb33f8ead30b2685d5e9983fcdfbedc4
2023-02-14 10:08:48 -08:00
..
git_mapping_pushrebase_hook Rename prepushrebase to in_critical_section and do it in the critical section 2023-02-14 10:08:48 -08:00
schemas mononoke: fix license headers for rust files 2022-01-06 00:20:51 -08:00
src Update BonsaiChangeset to support Git data model 2023-01-29 06:25:53 -08:00
test bonsai_*_mapping: remove auto_impl 2022-10-19 13:35:09 -07:00
Cargo.toml support abbreviated git commits in SCS 2023-01-13 05:38:42 -08:00