mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(client): write meta conflict
with: #1000451308 Signed-off-by: clinx <chenlin1@oppo.com>
This commit is contained in:
parent
09adcf3912
commit
2f6568e81c
@ -185,6 +185,8 @@ type ExtentHandler struct {
|
||||
storageClass uint32
|
||||
|
||||
isMigration bool
|
||||
|
||||
flushMu sync.Mutex
|
||||
}
|
||||
|
||||
// NewExtentHandler returns a new extent handler.
|
||||
@ -848,6 +850,9 @@ func (eh *ExtentHandler) createExtent(dp *wrapper.DataPartition) (extID int, err
|
||||
|
||||
// Handler lock is held by the caller.
|
||||
func (eh *ExtentHandler) flushPacket() {
|
||||
eh.flushMu.Lock()
|
||||
defer eh.flushMu.Unlock()
|
||||
|
||||
if eh.packet == nil {
|
||||
log.LogDebugf("ExtentHandler flushPacket nil, return: eh(%v)", eh)
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user