diff --git a/ddl/ingest/disk_root.go b/ddl/ingest/disk_root.go index d71dc65433a62..e2a1176a76878 100644 --- a/ddl/ingest/disk_root.go +++ b/ddl/ingest/disk_root.go @@ -52,7 +52,7 @@ func NewDiskRootImpl(path string, bcCtx *backendCtxManager) DiskRoot { // CurrentUsage implements DiskRoot interface. func (d *diskRootImpl) CurrentUsage() uint64 { - d.mu.RUnlock() + d.mu.RLock() usage := d.currentUsage d.mu.RUnlock() return usage @@ -60,7 +60,7 @@ func (d *diskRootImpl) CurrentUsage() uint64 { // MaxQuota implements DiskRoot interface. func (d *diskRootImpl) MaxQuota() uint64 { - d.mu.RUnlock() + d.mu.RLock() quota := d.maxQuota d.mu.RUnlock() return quota