mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
[Enhancement] Optimize the qos for random write
Signed-off-by: Tao Li <tomscut@apache.org>
This commit is contained in:
parent
72610e307c
commit
bf8aa1640f
@ -238,9 +238,6 @@ func (dp *DataPartition) ApplyRandomWrite(command []byte, raftApplyID uint64) (r
|
||||
raftApplyID, dp.partitionID, opItem.extentID, opItem.offset, opItem.size)
|
||||
|
||||
for i := 0; i < 20; i++ {
|
||||
dp.disk.allocCheckLimit(proto.FlowWriteType, uint32(opItem.size))
|
||||
dp.disk.allocCheckLimit(proto.IopsWriteType, 1)
|
||||
|
||||
err = dp.ExtentStore().Write(opItem.extentID, opItem.offset, opItem.size, opItem.data, opItem.crc, storage.RandomWriteType, opItem.opcode == proto.OpSyncRandomWrite)
|
||||
if err == nil {
|
||||
break
|
||||
|
||||
@ -92,7 +92,7 @@ func (s *DataNode) checkPartition(p *repl.Packet) (err error) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if p.IsWriteOperation() {
|
||||
if p.IsWriteOperation() || p.IsRandomWrite() {
|
||||
dp.disk.allocCheckLimit(proto.FlowWriteType, uint32(p.Size))
|
||||
dp.disk.allocCheckLimit(proto.IopsWriteType, 1)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user