In some cluster deployment cases it has been seen that in memory state of UnmergedBranches contains large number of empty commits. For e.g. in one of of the runs there were 750 entries in the UnmergedBranches and each Branch had empty branch commits.
If there are large number of UnmergedBranches then read performance would degrade as for determining revision validity currently logic scans all branches
Below is some part of UnmergedBranch state
mreutegg Suggested that these branch might be for those revision which have resulted in a collision and upon checking it indeed appears to be the case (value true in brackets above indicate that). Further given the age of such revision it looks like they get populated upon startup itself
- Need to check why we need to populate the UnermgedBranch
- Possibly implement some purge job which would remove such stale entries