IP Library Granted Patent US 12,001,397
Granted Patent B2
US 12,001,397 · App. 17/780,881 · Granted Jun 4, 2024

Method, apparatus and device for deleting distributed system file, and storage medium

Inventors: Wei Li (Jinan, CN); Xiangrui Meng (Jinan, CN)
Assignee: Inspur Electronic Information Industry Co., Ltd.
G06F16/162G06F16/134G06F16/148G06F16/182
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,001,397
App. No.
17/780,881
Granted
Jun 4, 2024
Kind
B2
Abstract

A method, apparatus and device for deleting a distributed system file, and a storage medium, comprising: querying whether an incomplete file deletion operation exists under a sub-tree root corresponding to a certain MDS (S 102 ); if there is an incomplete file deletion operation, continuing to delete data under the sub-tree root corresponding to the MDS, and determining whether the sub-tree root is a copy (S 103 ); and if the sub-tree root is a copy, deleting the sub-tree root copy in a memory of the MDS (S 104 ). By means of the steps, the number of copies of the sub-tree root in the distributed file system can be reduced, thereby reducing the number of interaction times of master copy locking between different MDSs, improving the file deletion efficiency, and improving user friendliness and differentiated competitiveness of a product.

Claims (36)

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.

2. The method for deleting a file in a distributed system according to claim 1 , characterized by further comprising:

performing segmentation and deletion operations on a file to be deleted according to the actual size of the file.

3. The method for deleting a distributed system file according to claim 2 , characterized in that performing segmentation and deletion operations on a file to be deleted according to the actual size of the file specifically comprises:

segmenting the file to be deleted into a plurality of objects to be deleted of which the size is equal to a stripe value according to the actual size of the file;

sending the objects to be deleted to an OSD corresponding to the objects to be deleted sequentially according to a preset sequence; and

performing a disk deletion operation on all the objects to be deleted by means of the OSD.

4. A device for deleting a file in a distributed system, characterized by comprising a processor and a memory, wherein the memory has a computer program stored therein, and the computer program, when executed by the processor, causes the processor to perform the following steps:

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.

5. A computer readable storage medium, having a computer program stored therein, characterized in that the computer program, when executed by a processor, causes the processor to perform the following steps:

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.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 27, 2022
From: LI, WEI; MENG, XIANGRUI
To: INSPUR ELECTRONIC INFORMATION INDUSTRY CO., LTD.
Reel/Frame 060042/0865 →
Priority Claims (1)
CN 201911205045.1 · Nov 29, 2019 · national
Continuity (1)
Related Publication 20230025135A1 · Jan 26, 2023