Commit 135f491
reftable/stack: return stack segments directly
The `stack_table_sizes_for_compaction()` function returns individual
sizes of each reftable table. This function is only called by
`reftable_stack_auto_compact()` to decide which tables need to be
compacted, if any.
Modify the function to directly return the segments, which avoids the
extra step of receiving the sizes only to pass it to
`suggest_compaction_segment()`.
A future commit will also add functionality for checking whether
auto-compaction is necessary without performing it. This change allows
code re-usability in that context.
Signed-off-by: Karthik Nayak <[email protected]>
Acked-by: Patrick Steinhardt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 31177a8 commit 135f491
1 file changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1626 | 1626 | | |
1627 | 1627 | | |
1628 | 1628 | | |
1629 | | - | |
| 1629 | + | |
| 1630 | + | |
1630 | 1631 | | |
1631 | 1632 | | |
1632 | 1633 | | |
1633 | 1634 | | |
1634 | 1635 | | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | | - | |
| 1638 | + | |
1638 | 1639 | | |
1639 | 1640 | | |
1640 | 1641 | | |
1641 | 1642 | | |
1642 | | - | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1643 | 1648 | | |
1644 | 1649 | | |
1645 | 1650 | | |
1646 | 1651 | | |
1647 | 1652 | | |
1648 | | - | |
| 1653 | + | |
1649 | 1654 | | |
1650 | 1655 | | |
1651 | 1656 | | |
1652 | 1657 | | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1660 | 1661 | | |
1661 | 1662 | | |
1662 | 1663 | | |
| |||
0 commit comments