feat(meta): free memory when deleting meta partitions.

close:#1000013477

Signed-off-by: shuqiang-zheng <zhengshuqiang@oppo.com>
This commit is contained in:
shuqiang-zheng 2025-03-21 15:08:50 +08:00 committed by zhumingze1108
parent 501dc61922
commit 324e23d2da

View File

@ -1524,7 +1524,9 @@ func (m *metadataManager) opDeleteMetaPartition(conn net.Conn,
os.RemoveAll(conf.RootDir)
p.PacketOkReply()
m.respondToClientWithVer(conn, p)
runtime.GC()
go func() {
debug.FreeOSMemory()
}()
log.LogInfof("%s [opDeleteMetaPartition] req: %d - %v, resp: %v",
remoteAddr, p.GetReqID(), req, err)
return