A new entity called ChunkSizeTracker will be responsible for keeping track of how many bytes are written to each chunk. This entity will be a member variable inside CollectionShardingState, and the tracking logic currently contained in cluster_write.cpp will be refactored into ChunkSizeTracker.
The proposal for the entire project can be found at the URL below, and a full description of the details of this ticket are described in the Proposal section.
https://docs.google.com/document/d/1ZPVukksl-oHJQtfDn5fjdLgxM3BgklE_8RKIP9UzQxg/