US 12,001,397 B2
Method, apparatus and device for deleting distributed system file, and storage medium
Wei Li, Jinan (CN); and Xiangrui Meng, Jinan (CN)
Assigned to Inspur Electronic Information Industry Co., Ltd., Jinan (CN)
Appl. No. 17/780,881
Filed by Inspur Electronic Information Industry Co., Ltd., Jinan (CN)
PCT Filed Jul. 23, 2020, PCT No. PCT/CN2020/103740
§ 371(c)(1), (2) Date May 27, 2022,
PCT Pub. No. WO2021/103600, PCT Pub. Date Jun. 3, 2021.
Claims priority of application No. 201911205045.1 (CN), filed on Nov. 29, 2019.
Prior Publication US 2023/0025135 A1, Jan. 26, 2023
Int. Cl. G06F 17/30 (2006.01); G06F 16/13 (2019.01); G06F 16/14 (2019.01); G06F 16/16 (2019.01); G06F 16/182 (2019.01)
CPC G06F 16/162 (2019.01) [G06F 16/134 (2019.01); G06F 16/148 (2019.01); G06F 16/182 (2019.01)] 5 Claims
OG exemplary drawing
 
1. A method for deleting a file in a distributed system, characterized by comprising:
querying whether an incomplete file deletion operation exists under a sub-tree root corresponding to a certain metadata server (MDS);
continuing to delete data under the sub-tree root corresponding to the MDS if there is an incomplete file deletion operation, and determining whether the sub-tree root is a copy; and
deleting the sub-tree root copy in a memory of the MDS if the sub-tree root is a copy;
creating a timed deleting task in the distributed system if there is no incomplete file deletion operation; and
balancing the number of sub-tree roots to be deleted among different MDSs according to the created timed deleting task;
wherein the step of balancing the number of sub-tree roots to be deleted among different MDSs according to the created timed deleting task specifically comprises:
acquiring and recording the number of sub-tree roots to be deleted with the timed deleting task on each MDS; and
calculating an average value of the number of sub-tree roots to be deleted on all MDSs; and
migrating sub-tree roots to be deleted to the MDSs having a number of sub-tree roots to be deleted lower than the average value sequentially from the MDS having the largest number of sub-tree roots to be deleted, until no MDS having a number of sub-tree roots to be deleted less than the average value exists.