Improve branch cache logic #17663
Labels
priority-2-high
Bugs impacting wide number of users or very important features
status:in-progress
Someone is working on implementation
type:refactor
Refactoring or improving of existing code
Describe the proposed change(s).
The branch cache should have this function, which is called at the start of branch processing each run:
syncBranchCache(branchName, branchSha, baseBranchName, baseBranchSha)
It's logic will be like this:
During branch processing we can call
setBranchModified(branchName, isModified)
,setBranchConflicted
,setBranchBehindBase
,setBranchFingerprint
. These don’t need SHAs because we assume they were sync’d earlier in the branch processing.Towards the end of branch processing, if we have pushed a commit (either branch creation or branch updating) then we call this function:
setBranchCommit(branchName, baseBranchName, branchSha, baseBranchSha, branchFingerprint)
. It should:false
Note:
parentSha
should not be reset duringsyncBranchCache()
- only duringsetBranchCommit()
.We should remove all git-level caching. It's OK for us to "lose" such existing cache values for one run while we populate the branch cache using the new logic.
The text was updated successfully, but these errors were encountered: