Closed cyl19970726 closed 1 year ago
The current ChunkIdx is calculated as follows in older versions of the code:
func (ds *DataShard) ChunkIdx() uint64 { return ds.shardIdx * ds.chunksPerKv * ds.kvEntries }
Thus , ds.ChunkIdx() means that the starting ChunkIdx of the current data shard.
This caused an error: ds.ChunkIdx() and kvIdx*ds.chunksPerKv have overlapping calculations
In my perspective, the correct calculation formula for current ChunkIdx is as follows :
Suggest to rename ChunkIdx() to StartChunkIdx() in order to avoid confusion.
ChunkIdx()
StartChunkIdx()
The current ChunkIdx is calculated as follows in older versions of the code:
Thus , ds.ChunkIdx() means that the starting ChunkIdx of the current data shard.
This caused an error: ds.ChunkIdx() and kvIdx*ds.chunksPerKv have overlapping calculations
In my perspective, the correct calculation formula for current ChunkIdx is as follows :