An orphan object finding method, device and readable storage medium

By using a bucket-based orphan object lookup method, the problem of low efficiency in orphan object lookup in distributed object storage systems is solved, achieving efficient lookup and deletion, and improving system storage efficiency and user experience.

CN115827950BActive Publication Date: 2025-11-28JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211446925.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-11-28
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

In existing technologies, distributed object storage systems cannot effectively find and delete orphan objects in abnormal scenarios such as cluster failures or node power outages, leading to increased storage space occupancy and low search efficiency.

Method used

An orphan object lookup method based on buckets is adopted. Metadata is obtained by traversing the head object, the corresponding tail object is found and recorded, tail objects without corresponding head objects are filtered out and identified as orphan objects, and the storage pool is traversed asynchronously for lookup and deletion.

Benefits of technology

It improves the efficiency of finding orphan objects, reduces invalid comparisons, increases the efficiency of finding and deleting orphan objects, frees up cluster space, and enhances user experience and product competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827950B_ABST
    Figure CN115827950B_ABST
Patent Text Reader

Abstract

The application discloses an orphan object searching method and device and a readable storage medium, and is applied to the field of data processing. The orphan object searching method provided by the application finds out a head object by traversing a storage pool where the head object is located, acquires metadata of the head object, finds and records a tail object having the corresponding head object according to the metadata of the head object. Then, the tail object is found out by traversing a storage pool where the tail object is located, tail objects having the corresponding head objects are filtered out, and the remaining tail objects are determined as orphan objects. Because the corresponding tail object can be found according to the head object, and the corresponding head object cannot be found according to the tail object, the scheme finds the head object and the tail object having the corresponding relationship through the head object first, and the tail objects are normal tail objects. Then, the normal tail objects are filtered out from all the tail objects, and the remaining tail objects are orphan objects. Compared with the original scheme, the application reduces invalid comparison and improves the searching efficiency of the orphan objects.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data processing, in particular to an orphan object searching method and device and readable storage medium. BACKGROUND

[0002] In recent years, with the development of the Internet, the amount of Internet data (unstructured data) is increasing, and distributed object storage has emerged as the times require. This emerging storage method is suitable for the storage of unstructured data such as pictures and videos. It also has the characteristics of block storage high-speed direct access disk and file storage distributed sharing, so it has been widely developed and applied since its introduction.

[0003] Currently, in the distributed object storage, when the cluster fails or the node power fails, etc. Abnormal scene, there will be a problem of orphan object, and these rados objects cannot be directly viewed and deleted by the user, and they always occupy storage space. With the use of the cluster for a longer time, the effective capacity of the cluster is getting lower and lower. In the current scheme, there is an orphan object searching scheme based on storage pool as a unit. This scheme traverses all rados objects in the pool and compares to find potential orphan objects. With the increase of the number of objects in the storage pool, the searching efficiency of this scheme is low.

[0004] In view of the above-mentioned technology, how to improve the searching efficiency of orphan objects is a problem to be solved by those skilled in the art. SUMMARY

[0005] The purpose of the present application is to provide an orphan object searching method, device and readable storage medium to improve the searching efficiency of orphan objects.

[0006] To solve the above-mentioned technical problem, the present application provides an orphan object searching method, comprising:

[0007] traversing a storage pool where a head object is located to find the head object and obtain metadata of the head object;

[0008] finding and recording a tail object corresponding to the head object according to the metadata of the head object;

[0009] traversing a storage pool where the tail object is located to find the tail object;

[0010] filtering out the tail object corresponding to the head object, and determining the remaining tail objects as orphan objects.

[0011] Preferably, the step of traversing a storage pool where a head object is located to find the head object and obtain metadata of the head object comprises:

[0012] Traverse the storage pool where the head object is located, determine the object starting with buckt_id and not containing the shadow field as the head object, and obtain the metadata of each head object.

[0013] Preferably, the step of traversing the storage pool where the tail object is located to find the tail object comprises:

[0014] Traverse the storage pool where each tail object is located, determine the object starting with buckt_id and containing the shadow field as the tail object.

[0015] Preferably, before the step of filtering out the tail object with the corresponding head object and determining the remaining tail objects as orphan objects, the method further comprises:

[0016] Obtaining the modification time of the tail object.

[0017] The step of filtering out the tail object with the corresponding head object and determining the remaining tail objects as orphan objects comprises:

[0018] If the modification time exceeds a threshold value, the tail object is determined as the orphan object.

[0019] Preferably, after the step of filtering out the tail object with the corresponding head object and determining the remaining tail objects as orphan objects, the method further comprises:

[0020] Deleting all the orphan objects.

[0021] Preferably, the step of traversing the storage pool where the head object and the tail object are located comprises:

[0022] Traversing the storage pool where each head object and each tail object is located in an asynchronous manner.

[0023] Preferably, after the step of deleting all the orphan objects, the method further comprises:

[0024] Polling the storage pool, and if there are still orphan objects in the storage pool after polling, performing an alarm processing.

[0025] To solve the above technical problems, the application further provides an orphan object finding device, comprising:

[0026] A first traversal module for traversing the storage pool where the head object is located to find the head object and obtaining the metadata of the head object;

[0027] A finding module for finding and recording the tail object with the corresponding head object according to the metadata of the head object;

[0028] A second traversal module for traversing the storage pool where the tail object is located to find the tail object.

[0029] a filtering module configured to filter out the tail object having the corresponding head object, and determine the remaining tail objects as orphan objects.

[0030] Preferably, the orphan object searching device further comprises: an acquisition module configured to acquire a modification time of the tail object before the filtering out of the tail object having the corresponding head object and the determining of the remaining tail objects as orphan objects; and the filtering out of the tail object having the corresponding head object and the determining of the remaining tail objects as orphan objects comprises: determining the tail object as the orphan object if the modification time exceeds a threshold.

[0031] Preferably, the orphan object searching device further comprises: a deletion module configured to delete all the orphan objects after the filtering out of the tail object having the corresponding head object and the determining of the remaining tail objects as orphan objects.

[0032] Preferably, the orphan object searching device further comprises: an alarm module configured to poll the storage pool after the deletion of all the orphan objects, and perform an alarm processing if there are still orphan objects in the storage pool after the polling.

[0033] To solve the above technical problem, the application further provides an orphan object searching device, comprising: a storage configured to store a computer program;

[0034] a processor configured to execute the computer program to implement the steps of the orphan object searching method.

[0035] To solve the above technical problem, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the orphan object searching method.

[0036] The orphan object searching method provided by the application finds out the head object by traversing the storage pool where the head object is located, and acquires the metadata of the head object, and finds and records the tail object having the corresponding head object according to the metadata of the head object. Then the tail object is found by traversing the storage pool where the tail object is located, the tail object having the corresponding head object is filtered out, and the remaining tail objects are determined as orphan objects. Because the corresponding tail object can be found according to the head object, and the corresponding head object cannot be found according to the tail object, the present solution first finds the head object and the tail object having the corresponding relationship through the head object, and this part of the tail object is a normal tail object. Then the normal tail object is filtered out from all the tail objects, and the remaining tail object is the orphan object. Compared with the original solution, the present application reduces invalid comparison and improves the searching efficiency of the orphan object.

[0037] The application further provides an orphan object searching device and a computer readable storage medium, which correspond to the above method and have the same beneficial effects. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0039] Figure 1 A flow chart of an orphan object searching method provided by an embodiment of the present application;

[0040] Figure 2 A structural diagram of an orphan object searching device provided by an embodiment of the present application;

[0041] Figure 3 A structural diagram of an orphan object searching device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the protection scope of the present application.

[0043] The core of the present application is to provide an orphan object searching method, device and readable storage medium, so as to improve the searching efficiency of orphan objects.

[0044] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail in combination with the drawings and specific embodiments.

[0045] Object storage is a new network storage architecture, which has the characteristics of SAN high-speed direct access disk and NAS distributed sharing, and has wide application prospect and application value. Orphan objects are tail objects without head objects due to cluster, node and other failures in object uploading, deletion and other scenarios. These objects cannot be completely deleted and occupy cluster storage space. With the development of the Internet, the amount of Internet data is increasing, and distributed object storage has emerged as the times require. This emerging storage method is suitable for the storage of unstructured data such as pictures and videos. It also has the characteristics of block storage high-speed direct access disk and file storage distributed sharing, so it has been widely developed and applied since its introduction. At present, in the distributed object storage, when the cluster fails or the node power fails and other abnormal scenarios, orphan objects may occur. These rados objects cannot be directly viewed and deleted by the user, and they always occupy storage space. As the cluster usage time becomes longer, the effective capacity of the cluster becomes lower. In the current scheme, there is a orphan object finding scheme based on storage pool. This scheme traverses all rados objects in the pool to compare and find potential orphan objects. As the number of objects in the storage pool increases, the efficiency of this scheme is low. Moreover, this scheme cannot solve the orphan object finding problem in the cross-storage pool scenario of object classification and layering. In view of the problem of orphan objects in object storage, the present application provides an orphan object viewing scheme based on buckets, which reduces the number of rados object comparisons, realizes cross-storage pool orphan object finding, and solves the problem of low efficiency of finding a large number of rados objects in the pool.

[0046] Figure 1 A flowchart of an orphan object finding method provided by an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in the figure, the method comprises the following steps:

[0047] S10: Traverse the storage pool where the head object is located to find the head object and obtain the metadata of the head object.

[0048] S11: Find and record the tail object with the corresponding head object according to the metadata of the head object.

[0049] S12: Traverse the storage pool where the tail object is located to find the tail object.

[0050] S13: Filter out the tail object with the corresponding head object, and determine the remaining tail objects as orphan objects.

[0051] The objects in the object storage include a head object and several tail objects. Orphan objects mainly appear in the process of uploading and deleting objects. In the process of uploading objects, tail objects are written first, and then head objects are written. If a fault occurs before the writing of head objects is completed, orphan objects will appear. In the process of deleting objects, head objects are deleted first, and then tail objects are added to the garbage collection queue. If a fault occurs when tail objects are added to the garbage collection queue, the tail objects will also become orphan objects. The head object includes an object name, and the corresponding tail object can be found according to the head object. The tail object only includes data, and the corresponding head object cannot be found according to the tail object. Therefore, the head object and the tail object having a corresponding relationship are found through the head object first, and the tail objects are normal tail objects. Then, the normal tail objects are filtered out from all the tail objects, and the remaining tail objects are orphan objects.

[0052] In addition, because the head object and the tail object both include an ID, but the tail object includes a shadow field, and the head object does not include the field, the field can be used to distinguish the head object and the tail object. Then, the head objects are found by traversing the storage pool in which the head objects are located, and the metadata of the head objects is obtained, including: traversing the storage pool in which the head objects are located, determining the objects not containing the shadow field as the head objects, and obtaining the metadata of the head objects. The tail objects are found by traversing the storage pool in which the tail objects are located, including: traversing the storage pool in which the tail objects are located, and determining the objects containing the shadow field as the tail objects.

[0053] The bucket granularity orphan object finding idea of the embodiment of the application is that the metadata of the bucket records the pool in which the head object of the object in the bucket is located and the multiple pools in which the tail objects are located. All the objects under a certain bucket in the pool start with the bucket id, and the head object and the tail object can be distinguished through the shadow field. All the head objects are found, the head object records the perfix (a prefix that can be used to identify the tail object) of the corresponding tail object, all the prefixes are recorded, and then all the tail objects are traversed. When the tail object does not contain all the recorded prefixes, it is an orphan object. Here, a specific orphan object finding and deleting scheme is provided: 1. Obtain the metadata bucket_info of the bucket, check the bucket_id, and check the pool (if it is a hierarchical case, it is multiple storage pools) in which the head object and the tail object are located. 2. Traverse the pool in which the head object is located, and traverse all the rados objects starting with the bucket_id and not containing the "shadow" field. 3. Obtain the information in the metadata in the head object, and when the head object contains the corresponding tail object, record the prefix of the tail object. 4. Traverse the rados objects (tail objects) starting with the bucket_id and containing the "shadow" field in the pool in which all the tail objects are located. When the rados object does not contain any prefix recorded in the foregoing, obtain the mtime (modification time) of the object. If the time is not the current day (excluding the object being operated), it is determined to be an orphan object. 5. Delete the orphan object. It should be noted that the above scheme is only one of the examples provided by the embodiment, and the specific implementation is not limited to this scheme. For example, the specific length of the modification time is not limited, and the actual situation is used as the standard. It can be set to one day, or it can be set according to the requirements.

[0054] The embodiment of the application provides an orphan object finding scheme for distributed object storage with a bucket as granularity, which finds orphan objects generated in a specified bucket. The previous granularity adjustment from a storage pool to a bucket effectively reduces the comparison times through bucket id and prefix, improves the finding efficiency, and solves the finding and deleting of orphan objects in cross-storage, as well as the finding of orphan objects in object grading and hierarchical cross-storage pool scenarios. The embodiment of the application provides an orphan object finding scheme for distributed object storage with a bucket as granularity, which solves the finding problem of orphan objects in the case of large cluster data size. Through the granularity of the bucket, a large number of invalid comparisons are reduced, and the finding speed is improved. At the same time, the finding of orphan objects in cross-storage pool is realized, which effectively releases the cluster space occupied by orphan objects in the fault scenario, improves the effective capacity of the cluster, brings good user experience, and improves the market competitiveness of the distributed object product.

[0055] In actual application, after filtering out the tail object with corresponding head object and determining the remaining tail objects as orphan objects, all the orphan objects need to be deleted. After deleting all the orphan objects, the storage pool can be polled. If there are still orphan objects in the storage pool after polling, an alarm is processed. In addition, the storage pool where each head object and each tail object is located can be traversed in an asynchronous manner when traversing the head objects and the tail objects, which can improve efficiency.

[0056] The orphan object finding method provided by the embodiment of the application finds the head objects by traversing the storage pool where the head objects are located, obtains the metadata of the head objects, and finds and records the tail objects with corresponding head objects according to the metadata of the head objects. Then the tail objects are found by traversing the storage pool where the tail objects are located, the tail objects with corresponding head objects are filtered out, and the remaining tail objects are determined as orphan objects. Because the corresponding tail objects can be found according to the head objects, and the corresponding head objects cannot be found according to the tail objects, the head objects and the tail objects with corresponding relationship are found by the head objects in the present solution, and the tail objects are normal tail objects. Then the normal tail objects are filtered out from all the tail objects, and the remaining tail objects are orphan objects. Compared with the original solution, the present solution reduces invalid comparison and improves the finding efficiency of the orphan objects.

[0057] A bucket is a container for storing objects (Object). All objects must belong to a certain bucket. Bucket attributes can be set and modified to control region, access permission, life cycle, etc. These attribute settings directly affect all objects in the bucket, so different management functions can be completed by flexibly creating different buckets. The interior of the same bucket is flat, without the concept of file system directory, and all objects directly belong to their corresponding buckets. The number of objects in the bucket is not limited.

[0058] The embodiment provides a scheme for distinguishing head objects and tail objects. Because the head objects and the tail objects both include ID, but the tail objects include a shadow field, and the head objects do not include the field, the field can be used to distinguish the head objects and the tail objects. The finding of the head objects by traversing the storage pool where the head objects are located and the obtaining of the metadata of the head objects include: traversing the storage pool where the head objects are located, determining the objects starting with buckt_id and not containing the shadow field as head objects, and obtaining the metadata of the head objects. The finding of the tail objects by traversing the storage pool where the tail objects are located includes: traversing the storage pool where the tail objects are located, and determining the objects starting with buckt_id and containing the shadow field as tail objects.

[0059] According to the above embodiment, the orphan object can be found by the following scheme: obtaining the metadata bucket_info of the bucket, checking the bucket_id, checking the pool where the head object and the tail object are located. Traversing the pool where the head object is located, traversing all rados objects starting with the bucket_id and not containing the "shadow" field. Obtain the information in the metadata in the head object, and when the head object contains the corresponding tail object, record the prefix of the tail object. Traverse all rados objects (tail objects) in the pool where the tail object is located, starting with the bucket_id and containing the "shadow" field. When the tail object does not contain any prefix recorded above, it means that the tail object does not have a corresponding head object, i.e. it may be an orphan object. In actual application, if the tail object does not contain any prefix recorded above, it may be an object being operated, so the mtime (modification time) of the object can be obtained. If the time is not today (excluding the object being operated), it is determined as an orphan object. That is, before filtering out the tail objects with corresponding head objects and determining the remaining tail objects as orphan objects, the modification time (mtime) of the tail object is obtained; and filtering out the tail objects with corresponding head objects and determining the remaining tail objects as orphan objects includes: if the modification time exceeds a threshold, the tail object is determined as an orphan object. The specific length of the modification time is not limited, and can be set to one day according to the actual situation.

[0060] The present application proposes a bucket-granularity distributed object storage orphan object finding scheme, which can find orphan objects generated in a specified bucket. The present scheme adjusts the previous storage pool-granularity to bucket-granularity, effectively reduces the comparison times through bucket id and prefix, improves the finding efficiency, and at the same time, the bucket-granularity can solve the finding and deletion of orphan objects across storage. The present scheme realizes the finding of orphan objects in the case of large cluster data size, reduces a large number of invalid comparisons through bucket-granularity, and improves the finding speed. At the same time, the present scheme also realizes the finding of orphan objects across storage pools, effectively releases the cluster space occupied by orphan objects in the fault scenario, improves the effective capacity of the cluster, brings good user experience, and improves the market competitiveness of the distributed object product.

[0061] In actual application, after filtering out the tail objects with corresponding head objects and determining the remaining tail objects as orphan objects, all orphan objects need to be deleted. After deleting all orphan objects, the storage pool can be polled, and if there are still orphan objects in the storage pool after polling, an alarm processing is performed. In addition, when traversing the head objects and the tail objects, the storage pools where the head objects and the tail objects are located can be traversed in an asynchronous manner, which can improve the efficiency.

[0062] In the above embodiments, the orphan object searching method is described in detail, and the application further provides corresponding embodiments of an orphan object searching device. It should be noted that the embodiments of the device part are described from two angles, one is based on the functional module angle, and the other is based on the hardware angle.

[0063] Based on the functional module angle, the embodiment provides an orphan object searching device, Figure 2 The structure diagram of the orphan object searching device provided by the embodiment of the application is shown in Figure 2 The device comprises:

[0064] The first traversal module 10 is configured to traverse the storage pool where the head object is located to find the head object and obtain the metadata of the head object.

[0065] The searching module 11 is configured to search and record the tail object corresponding to the head object according to the metadata of the head object.

[0066] The second traversal module 12 is configured to traverse the storage pool where the tail object is located to find the tail object.

[0067] The filtering module 13 is configured to filter the tail object corresponding to the head object, and determine the remaining tail objects as orphan objects.

[0068] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, and are not described here.

[0069] As a preferred implementation, the orphan object searching device further comprises: an obtaining module configured to obtain the modification time of the tail object before filtering the tail object corresponding to the head object and determining the remaining tail objects as orphan objects; and filtering the tail object corresponding to the head object and determining the remaining tail objects as orphan objects comprises: determining the tail object as an orphan object if the modification time exceeds a threshold.

[0070] The deleting module is configured to delete all the orphan objects after filtering the tail object corresponding to the head object and determining the remaining tail objects as orphan objects.

[0071] The alarm module is configured to poll the storage pool after deleting all the orphan objects, and perform alarm processing if there are still orphan objects in the storage pool after polling.

[0072] The orphan object finding device provided by the embodiment of the present application finds out the head object and obtains the metadata of the head object by the first traversal module traversing the storage pool where the head object is located, and the finding module finds and records the tail object corresponding to the head object according to the metadata of the head object. Then the second traversal module traverses the storage pool where the tail object is located to find out the tail object, the filtering module filters out the tail object corresponding to the head object, and the remaining tail objects are determined as orphan objects. Because the corresponding tail object can be found according to the head object, and the corresponding head object cannot be found according to the tail object, the present solution first finds the head object and the tail object having the corresponding relationship through the head object, and the tail object is a normal tail object. Then the normal tail objects are filtered out from all the tail objects, and the remaining tail objects are orphan objects. Compared with the original solution, the present application reduces invalid comparison and improves the finding efficiency of orphan objects.

[0073] From the perspective of hardware, the embodiment provides another orphan object finding device, Figure 3 The structure diagram of the orphan object finding device provided by another embodiment of the present application is shown in Figure 3 The orphan object finding device includes a memory 20 for storing a computer program.

[0074] The processor 21 is configured to execute the computer program to implement the steps of the orphan object finding method mentioned in the above embodiments.

[0075] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 21 can also include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, also known as a central processing unit (CPU). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a graphics processor (GPU) that is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 can also include an artificial intelligence (AI) processor for processing machine learning-related computing operations.

[0076] The memory 20 can include one or more computer-readable storage media that can be non-transitory. The memory 20 can also include high-speed random access memory and nonvolatile, computer-readable storage media such as one or more magnetic disk storage devices, flash memory devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein the computer program is loaded and executed by the processor 21, and can realize the related steps of the orphan object finding method disclosed in any of the foregoing embodiments. In addition, the resources stored by the memory 20 can also include an operating system 202 and data 203, etc., and the storage mode can be temporary storage or permanent storage. The operating system 202 can include Windows, Unix, Linux, etc. The data 203 can include but is not limited to data related to the orphan object finding method, etc.

[0077] In some embodiments, the orphan object finding device can further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0078] Those skilled in the art can understand that the structure shown in the figure does not constitute a limitation on the orphan object finding device, and can include more or fewer components than shown in the figure.

[0079] The orphan object finding device provided by the embodiment of the present application includes a memory and a processor, and the processor can realize the following method when executing the program stored in the memory: the orphan object finding method.

[0080] The orphan object finding device provided by the embodiment of the present application finds the head object by traversing the storage pool where the head object is located, and obtains the metadata of the head object, and finds and records the tail object corresponding to the head object according to the metadata of the head object. Then the tail object is found by traversing the storage pool where the tail object is located, the tail object with the corresponding head object is filtered out, and the remaining tail objects are determined as orphan objects. Because the corresponding tail object can be found according to the head object, and the corresponding head object cannot be found according to the tail object, the present solution first finds the head object and the tail object with the corresponding relationship through the head object, and this part of the tail object is a normal tail object. Then the normal tail objects are filtered out from all the tail objects, and the remaining tail objects are orphan objects. Compared with the original solution, the present solution reduces invalid comparison and improves the finding efficiency of orphan objects.

[0081] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps recorded in the foregoing method embodiment.

[0082] It can be understood that if the method in the above embodiment is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and performs all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0083] The computer readable storage medium provided by the embodiment has the same beneficial effects as the above method.

[0084] The orphan object searching method, device and readable storage medium provided by the present application are described in detail above. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the differences from other embodiments. The same or similar parts of each embodiment can be referred to. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, the present application can be improved and modified, and these improvements and modifications also fall within the protection scope of the claims of the present application.

[0085] It should be further noted that in the present specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or equipment including the above element.

Claims

1. An orphan object finding method, characterized by, The method comprises the following steps: traversing a storage pool where a head object is located to find the head object and obtaining metadata of the head object; the metadata of the head object records a perfix of a corresponding tail object; the perfix is used to identify the tail object; finding and recording the tail object corresponding to the head object according to the metadata of the head object; traversing a storage pool where the tail object is located to find the tail object; the storage pool where the head object is located and the storage pool where the tail object is located are determined according to a bucket_id in metadata bucket_info of a bucket; filtering out the tail object corresponding to the head object, and determining the remaining tail objects as orphan objects; the step of traversing the storage pool where the head object is located to find the head object and obtaining the metadata of the head object comprises the following steps: traversing the storage pool where the head object is located, determining an object starting with a buckt_id and not containing a shadow field as the head object, and obtaining the metadata of each head object; the step of traversing the storage pool where the tail object is located to find the tail object comprises the following steps: traversing the storage pool where each tail object is located, and determining an object starting with a buckt_id and containing a shadow field as a tail object; the step of traversing the storage pool where the head object and the tail object are located comprises the following steps: traversing the storage pool where each head object and each tail object is located in an asynchronous manner.

2. The orphan object lookup method of claim 1, wherein, Before the step of filtering out the tail object corresponding to the head object, and determining the remaining tail objects as orphan objects, the method further comprises the following steps: obtaining a modification time of the tail object; the step of filtering out the tail object corresponding to the head object, and determining the remaining tail objects as orphan objects comprises the following steps: if the modification time exceeds a threshold value, determining the tail object as the orphan object.

3. The orphan object finding method according to any one of claims 1 to 2, characterized by, After the step of filtering out the tail object corresponding to the head object, and determining the remaining tail objects as orphan objects, the method further comprises the following steps: deleting all the orphan objects.

4. The orphan object finding method of claim 3, wherein, After the step of deleting all the orphan objects, the method further comprises the following steps: polling the storage pool, and if there are still orphan objects in the storage pool after polling, performing alarm processing.

5. An orphan object finding apparatus characterized by comprising: The method comprises the following steps: a first traversal module is configured to traverse a storage pool where a head object is located to find the head object and obtain metadata of the head object; the metadata of the head object records a perfix of a corresponding tail object; the perfix is used to identify the tail object; a finding module is configured to find and record the tail object corresponding to the head object according to the metadata of the head object; a second traversal module is configured to traverse a storage pool where the tail object is located to find the tail object; the storage pool where the head object is located and the storage pool where the tail object is located are determined according to a bucket_id in metadata bucket_info of a bucket; a filtering module is configured to filter out the tail object corresponding to the head object, and determine the remaining tail objects as orphan objects; the step of traversing the storage pool where the head object is located to find the head object and obtaining the metadata of the head object comprises the following steps: traversing the storage pool where the head object is located to determine the head object as an object starting with buckt_id and not containing a shadow field, and obtaining metadata of each head object; the traversing the storage pool where the tail object is located to find the tail object comprises: traversing the storage pool where each tail object is located to determine the tail object as an object starting with buckt_id and containing a shadow field; the traversing the storage pool where the head object and the tail object are located comprises: traversing the storage pool where each head object and each tail object is located in an asynchronous manner.

6. An orphan object finding apparatus characterized by comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the orphan object searching method according to any one of claims 1 to 4.

7. A computer readable storage medium characterized in that, a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the orphan object searching method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Junk data recognition method and system, electronic equipment and storage medium

    CN111177075A