Problem
The current fraction management implementation uses a proxy wrapper with mutex for safe access to the changing list of fractions. This approach does not scale for planned compaction and partitioning features where:
- Multiple fractions can merge into one
- One fraction can split into several
- Fraction lifecycle becomes more complex and doesn't fit the current model
Task
Replace the current proxy wrapper system with a fraction snapshots mechanism using reference counting via wait group.
Proposed Solution
- Fraction Snapshots: Create a snapshot of the fraction list whenever its composition changes
- Reference Counting: Use
wait group to track active uses of fractions
- Safe Deletion: Guarantee that a fraction won't be deleted while it's being used by someone