A method, apparatus, device, and medium for determining operational failure.
By establishing a mapping between map cache containers and rados objects, and obtaining and storing operation information, the problem of determining operation failures is solved, improving error checking efficiency and storage efficiency.
Patent Information
- Application Number
- CN202210870899.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In existing technologies, there is a lack of effective methods to determine when an operation fails, resulting in low error checking efficiency and reduced storage efficiency.
By establishing a correspondence between the map cache container and the rados object, the op operation information is obtained and stored in the map cache container, flushed down and stored in the rados object, and the failure is determined by whether the rados object contains information indicating the failure of the op operation.
It improves error checking efficiency, avoids the accumulation of large amounts of information and data in the system, and improves storage efficiency.
Smart Images

Figure CN115237715B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed storage technology, and in particular to a method, apparatus, device, and medium for determining the failure of an operation (op). Background Technology
[0002] With the rapid development of distributed storage technology, operations (OPs) in distributed storage generally fall into three categories: uploading objects, listing objects, and deleting objects. Currently, OPs are processed automatically by computers. When errors occur in these three types of OPs, there is no way to determine whether an OP was successful, thus preventing technicians from promptly detecting OP failures. Currently, technicians detect OP errors by checking log files corresponding to the missing required information and / or data, leading to OP failures. This method is inefficient, and because technicians cannot promptly detect OP failures, large amounts of information and / or data accumulate in the system, reducing storage efficiency.
[0003] Given the aforementioned problems, finding ways to improve error checking efficiency and storage efficiency is a problem that those skilled in the art are striving to solve. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, device, and medium for determining operational failures, thereby improving error detection efficiency and storage efficiency.
[0005] To address the aforementioned technical problems, this application provides a method for determining if an operation (op) has failed, comprising:
[0006] Based on the op operation, a map cache container and a rados object are created, with a one-to-one correspondence between the map cache container and the rados object;
[0007] Obtain the operation information of the op operation, which includes at least the operation result;
[0008] Store the operation information in the map cache container;
[0009] The operation information is flushed down and stored in the rados object;
[0010] The operation is considered to have failed when the rados object contains operation information indicating that the operation failed.
[0011] Preferably, after obtaining the operation information of the op operation and before storing the operation information in the map cache container, the method further includes:
[0012] Determine whether the operation result indicates that the op operation has been completed;
[0013] If so, proceed to the step of storing the operation information in the map cache container;
[0014] If not, return to the step of obtaining the operation information for the op operation.
[0015] Preferably, flushing and storing the operation information in the rados object includes:
[0016] Send the operation information and the raw information in the rados object to the osd;
[0017] Overlay operation information and original information in OSD;
[0018] The superimposed operation information and the original information are transmitted to the rados object and stored.
[0019] Preferably, if the confirmation that the operation result indicates that the operation has been completed, the method further includes:
[0020] Output a message indicating that the op operation has been completed.
[0021] Preferably, after determining that the operation has failed, the method further includes:
[0022] Output alarm information.
[0023] Preferably, creating the map cache container and rados object based on the op operation includes:
[0024] Create a map cache container based on the type of op operation;
[0025] Based on the map cache container, rados objects of omap structure are created one by one according to the mapping relationship.
[0026] Preferably, the number of op operations, the number of map cache containers, and the number of rados objects are all set to 3.
[0027] To address the aforementioned technical problems, this application also provides an apparatus for determining if an operation has failed, comprising:
[0028] The first module is used to create map cache containers and rados objects based on op operations. The map cache containers and rados objects correspond one-to-one.
[0029] The acquisition module is used to acquire operation information of the op operation, which includes at least the operation result.
[0030] The storage module is used to store operation information in the map cache container;
[0031] The flush module is used to flush operation information and store it in a rados object;
[0032] The determination module is used to determine if an op operation has failed when the rados object contains operation information indicating that the op operation has failed.
[0033] In addition, the device also includes the following modules:
[0034] The judgment module is used to determine whether the operation result indicates that the op operation has been completed;
[0035] If so, then proceed to the storage module;
[0036] If not, return to the retrieval module.
[0037] The sending module is used to send the operation information and the original information in the rados object to the osd;
[0038] An overlay module is used to overlay the operation information and the original information into the OSD;
[0039] The transmission module is used to transmit the superimposed operation information and the original information to the rados object and store them.
[0040] The output prompt information module is used to output prompt information indicating that the operation has been completed.
[0041] The alarm information output module is used to output alarm information.
[0042] The second creation module is used to create the map cache container according to the type of the op operation;
[0043] The third module is used to create the rados objects of the omap structure one by one according to the mapping relationship based on the map cache container.
[0044] To address the aforementioned technical problems, this application also provides a device for determining operational failure, comprising:
[0045] Memory, used to store computer programs;
[0046] A processor is used to direct a computer program to implement the steps of determining if an operation (op) has failed.
[0047] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for determining all operation failures described above.
[0048] The method for determining operation failure provided in this application includes: establishing a map cache container and a rados object based on the operation, with a one-to-one correspondence between the map cache container and the rados object; obtaining the operation information of the operation, which includes at least the operation result; storing the operation information in the map cache container; flushing the operation information down and storing it in the rados object; and determining that the operation has failed when the rados object contains operation information indicating that the operation has failed. Since the established map cache container can store all the operation information of the operation and store it together in the established rados object, if the rados object contains operation information indicating that the operation has failed, then the operation has failed. This eliminates the need for technicians to analyze log files to determine if the operation has failed, improving error detection efficiency. Furthermore, because technicians are promptly informed of errors in the operation, it avoids the accumulation of large amounts of information and / or data in the system, thus improving storage efficiency.
[0049] This application also provides a device, apparatus, and medium for determining operational failures, with the same effect as above. Attached Figure Description
[0050] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This application provides a flowchart of a method for determining an operation failure.
[0052] Figure 2 A structural diagram of a device for determining an operation failure provided in an embodiment of this application;
[0053] Figure 3 This is a structural diagram of a device for determining an operation failure, provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0055] The core of this application is to provide a method, apparatus, device, and medium for determining operational failures, which can improve error detection efficiency and storage efficiency.
[0056] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0057] Figure 1 This is a flowchart illustrating a method for determining an operation failure as provided in an embodiment of this application. Figure 1 As shown, this method for determining if an operation has failed includes:
[0058] S10: Create a map cache container and a rados object based on the op operation.
[0059] There is a one-to-one correspondence between the map cache container and the rados object. The process of creating the map cache container and rados object based on the op operation includes the following steps:
[0060] Create a map cache container based on the type of op operation;
[0061] Based on the map cache container, rados objects of omap structure are created one by one according to the mapping relationship.
[0062] It should be noted that each type of operation will correspond to a map cache container, and there is a one-to-one mapping between the map cache container and the rados object. The following is an example illustrating the above implementation:
[0063] Since operations (OPs) generally fall into three categories: uploading objects, listing objects, and deleting objects, when the OP is an upload object, a map cache container corresponding to the upload object's OP is created, and a rados object corresponding to the upload object's OP is created based on the map cache container of the upload object's OP. The other two types follow the same process.
[0064] The Open Multimedia Applications Platform (omap) is an application processor architecture designed to support third-generation (3G) wireless terminal applications. This processor combines a DSP processor core with a RISC architecture processor, becoming a highly integrated System-on-a-Chip (SoC). omap provides the bandwidth and functionality required for voice, data, and multimedia, delivering excellent performance for high-end 3G wireless devices with extremely low power consumption. The omap embedded processor family includes application processors and integrated baseband application processors, and is currently widely used in real-time multimedia data processing, voice recognition systems, internet communication, wireless communication, PDAs, web notebooks, medical devices, and other fields. omap application processors offer various Cortex-A8 core combinations, peripherals with rich multimedia functions, and more. The ES2.0 is compatible with the graphics engine, video accelerator, and TMS320C64x+ DSP core. The modular and scalable omap35x Evaluation Module (EVM) provides all the components currently needed for development on the omap3503 processor, including the OMAP3503 Linux board support package based on the 2.6.22 kernel.
[0065] S11: Get the operation information of the op operation.
[0066] The operation information includes at least the operation result. In this embodiment, the operation information may also include the user name, tenant name, etc. In this embodiment, the specific content of the operation information is not limited, and its implementation method can be determined according to the specific implementation scenario. It should be noted that in this embodiment, the operation information can be represented in text form or in data string form. When the operation information is represented in text form, the operation information can be "username is user" or "tenant name is z-user"; when the operation information is represented in data string form, it can be represented by 1-bit, 2-bit, 4-bit, or 8-bit data strings, which can be represented as "0", "10", "1100", and "00101001" according to the order of mention of the above data strings. It is understood that the above-mentioned representation of operation information is only one of many embodiments, and does not limit the representation of operation information in this embodiment. Its implementation method can be determined according to the specific implementation scenario.
[0067] S12: Store the operation information in the map cache container.
[0068] S13: Flush the operation information and store it in the rados object.
[0069] S14: If the rados object contains operation information indicating that the op operation failed, then the op operation is determined to have failed.
[0070] In this embodiment, as a more preferred implementation, the number of op operations, the number of map cache containers, and the number of rados objects are all set to three. This is because op operations generally fall into three categories: uploading objects, listing objects, and deleting objects. It is understood that as the types of op operations increase, the number of op operations, the number of map cache containers, and the number of rados objects also increase accordingly.
[0071] The method for determining operation failure provided in this application includes: establishing a map cache container and a rados object based on the operation, with a one-to-one correspondence between the map cache container and the rados object; obtaining the operation information of the operation, which includes at least the operation result; storing the operation information in the map cache container; flushing the operation information down and storing it in the rados object; and determining that the operation has failed when the rados object contains operation information indicating that the operation has failed. Since the established map cache container can store all the operation information of the operation and store it together in the established rados object, if the rados object contains operation information indicating that the operation has failed, then the operation has failed. This eliminates the need for technicians to analyze log files to determine if the operation has failed, improving error detection efficiency. Furthermore, because technicians are promptly informed of errors in the operation, it avoids the accumulation of large amounts of information and / or data in the system, thus improving storage efficiency.
[0072] Based on the above embodiments, as a more preferred implementation, after obtaining the operation information of the op operation and before storing the operation information in the map cache container, the method further includes:
[0073] Determine whether the operation result indicates that the op operation has been completed;
[0074] If so, proceed to the step of storing the operation information in the map cache container;
[0075] If not, return to the step of obtaining the operation information for the op operation.
[0076] To improve storage efficiency, it is necessary to first determine whether the operation result indicates that the op operation has been completed. If it has, subsequent operations are performed; if not, the process returns to the step of obtaining the operation information of the op operation until the operation result indicates that the op operation has been completed, at which point subsequent operations are performed again. It should be noted that the completion of the op operation can be indicated by text or by a data string. When using text, the information can be "execution completed"; when using a data string, the operation information can be represented by 1-bit, 2-bit, 4-bit, or 8-bit data strings, which can be represented as "0", "01", "1000", and "01100011" in the order mentioned above. Furthermore, the number of "0"s and / or "1"s in the data string can also be used to determine whether the operation result indicates that the op operation has been completed. It is understood that the above-mentioned methods of representing operation information are only one of many embodiments and do not limit the representation of operation information in this embodiment. The implementation method can be determined according to the specific implementation scenario.
[0077] It should be noted that, to facilitate technical personnel in recognizing the completion of the operation, as a preferred implementation, after confirming the completion of the operation, the method further includes outputting a prompt message indicating the completion of the operation. Similarly, the prompt message can be represented in text form or as a data string. When using text, the prompt message can be "Execution Completed"; when using a data string, it can be represented by 1-bit, 2-bit, 4-bit, or 8-bit data strings, which can be represented as "1", "00", "0110", and "11010001" in the order mentioned above. Furthermore, weight values can be assigned to the prompt message; for example, different weight values can be assigned to different types of operation completions. When using text, keywords in the prompt message can be identified and assigned different weight values; when using a data string, the number of "0"s and / or "1"s in the data string can be used to assign different weight values. It should be noted that in this embodiment, the range of the weight value is not limited and can be any positive number between 0-1, 0-10, or 0-100; when the weight value is in the range of 0-1, its decimal precision can be as low as one decimal place. It is understood that the above-mentioned representation of the prompt information is only one of many embodiments, and does not limit the representation of the prompt information in this embodiment. The implementation method can be determined according to the specific implementation scenario.
[0078] Based on the above embodiments, as a more preferred implementation, flushing and storing the operation information in the rados object includes:
[0079] Send the operation information and the raw information in the rados object to the osd;
[0080] Overlay operation information and original information in OSD;
[0081] The superimposed operation information and the original information are transmitted to the rados object and stored.
[0082] To prevent information loss in the system, operation information and original information are overlaid in the OSD and then transmitted to a Rados object for storage, thereby achieving information backup.
[0083] It should be noted that the object-based storage mentioned in this embodiment is a new network storage architecture, and the device based on object storage technology is called an object-based storage device (OSD). The core of the object storage structure is the separation of the data path (data read or write) and the control path (metadata), and the construction of the storage system based on OSDs. Each object storage device can automatically manage the data distribution on it. The object storage structure mainly consists of objects, object storage devices, metadata servers, and clients of the object storage system.
[0084] In this system, an object is the basic unit of data storage. An object is essentially a combination of file data and a set of attribute information (meta data). This attribute information can define file-based Redundant Arrays of Independent Disks (RAID) parameters, data distribution, quality of service, and so on. Traditional storage systems use files or blocks as the basic storage unit. In block storage systems, it's also necessary to constantly track the attributes of each block. Objects maintain their attributes by communicating with the storage system. In a storage device, every object has an object identifier, which is accessed via OSD commands. There are typically several types of objects: the root object on a storage device identifies the storage device and its various attributes; group objects are collections of objects on the storage device that share resource management strategies, and so on.
[0085] Object storage devices have their own CPU, memory, network, and disk systems. The difference between OSDs and block devices lies not in the storage medium, but in the access interfaces they provide. The main functions of an OSD include data storage and secure access. Currently, blade architectures are commonly used internationally for object storage devices. OSDs provide three main functions: data storage; OSDs manage object data and place it on standard disk systems. OSDs do not provide block interface access; when users request data, they use object IDs and offsets for data read and write. Intelligent distribution; OSDs optimize data distribution using their own CPU and memory and support data prefetching. Because OSDs can intelligently support object prefetching, they can optimize disk performance. Management of metadata for each object; OSDs manage the metadata of the objects stored on them, which typically includes the object's data blocks and object length. In traditional NAS systems, this metadata is maintained by file servers. Object storage architectures delegate the main metadata management work to OSDs, reducing user overhead.
[0086] Currently, there are three storage formats for independent object storage: block storage, file storage, and the newly emerging object storage. Block storage, simply put, consists of multiple hard drives directly mounted on the host machine. What the host machine sees are these hard drives and their partitions. File storage refers to storage on a file system, specifically the file system within the host operating system. Users can open and modify files through applications within the operating system. Architecturally, file storage provides a Network Attached Storage (NAS) architecture, allowing the host's file system to extend beyond the local file system and connect to shared file systems within a local area network.
[0087] The new object storage is a massive, object / file-oriented internet storage solution, which can also be directly referred to as "cloud storage." Although objects are files, they are encapsulated files (objects in programming inherently possess encapsulation). This means that in an object storage system, you cannot directly open / modify files, but you can upload and download files like with FTP. Furthermore, object storage doesn't have a multi-layered file structure like a file system; instead, it uses a single concept of "buckets" (storage spaces), containing only objects—a very flat storage approach. Its most significant feature is that its object name is a domain name address. Once an object is set to "public," all internet users can access it; its owner can also access objects within it via a REST API. Therefore, the most mainstream use case for object storage is storing static content (videos, images, files, software installation packages, etc.) for websites, mobile apps, and other internet / mobile internet applications.
[0088] Based on the above embodiments, as a more preferred implementation, after determining that the operation has failed, the method further includes: outputting alarm information. It should be noted that the alarm information can be represented in text form or in data string form. When using text form, the alarm information can be "execution completed"; when using data string form, the alarm information can be represented by 1-bit, 2-bit, 4-bit, or 8-bit data strings, which can be represented as "1", "00", "0110", and "11010001" in the order mentioned above. Furthermore, alarm information can be assigned weight values; for example, different weight values can be assigned to different types of operation completions. When using text form, keywords in the alarm information can be identified and assigned different weight values; when using data string form, the number of "0"s and / or "1"s in the data string can be used to assign different weight values. It should be noted that in this embodiment, the range of the weight value is not limited and can be any positive number between 0-1, 0-10, or 0-100; when the weight value is in the range of 0-1, its decimal precision can be as low as one decimal place. It is understood that the above-mentioned representation of alarm information is only one of many embodiments, and does not limit the representation of alarm information in this embodiment. The implementation method can be determined according to the specific implementation scenario.
[0089] In the above embodiments, the method for determining the failure of an operation (OP) has been described in detail. This application also provides embodiments corresponding to the apparatus for determining the failure of an OP. It should be noted that this application describes the embodiments of the apparatus from two perspectives: one based on functional modules and the other based on hardware.
[0090] Figure 2 This is a structural diagram of a device for determining an operation failure, provided in an embodiment of this application. Figure 2 As shown, this application also provides an apparatus for determining if an operation has failed, comprising:
[0091] The first module 20 is used to create a map cache container and a rados object according to the op operation. The map cache container and the rados object correspond one-to-one.
[0092] Module 21 is used to acquire operation information of the op operation, which includes at least the operation result;
[0093] Storage module 22 is used to store operation information in a map cache container;
[0094] The down-flush module 23 is used to flush operation information down and store it in the rados object;
[0095] The determination module 24 is used to determine if an op operation has failed when the rados object contains operation information indicating that the op operation has failed.
[0096] In addition, the device also includes the following modules:
[0097] The judgment module is used to determine whether the operation result indicates that the op operation has been completed;
[0098] If so, then proceed to the storage module;
[0099] If not, return to the retrieval module.
[0100] The sending module is used to send the operation information and the original information in the rados object to the osd;
[0101] An overlay module is used to overlay the operation information and the original information into the OSD;
[0102] The transmission module is used to transmit the superimposed operation information and the original information to the rados object and store them.
[0103] The output prompt information module is used to output prompt information indicating that the operation has been completed.
[0104] The alarm information output module is used to output alarm information.
[0105] The second creation module is used to create the map cache container according to the type of the op operation;
[0106] The third module is used to create the rados objects of the omap structure one by one according to the mapping relationship based on the map cache container.
[0107] Since the aforementioned apparatus for determining operation failure is also applied to the method for determining operation failure provided in this application, the method comprises the following steps: establishing a map cache container and a rados object based on the operation, with a one-to-one correspondence between the map cache container and the rados object; obtaining the operation information of the operation, which includes at least the operation result; storing the operation information in the map cache container; flushing the operation information down and storing it in the rados object; and determining that the operation has failed when the rados object contains operation information indicating that the operation has failed. Because the established map cache container can store all the operation information of the operation and store it together in the established rados object, if the rados object is found to contain operation information indicating that the operation has failed, then the operation has failed. In this case, technicians do not need to analyze whether the operation has failed through log files, improving error checking efficiency. Furthermore, because technicians are promptly informed of errors in the operation, a large amount of information and / or data is avoided from accumulating in the system, thus improving storage efficiency.
[0108] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0109] Figure 3 This application provides a device structure diagram for determining an operation failure, as shown in the embodiments of the present application. Figure 3 As shown, a method for determining operational failure includes:
[0110] Memory 30 is used to store computer programs;
[0111] The processor 31 is configured to implement the steps of the method for determining the failure of the op operation as mentioned in the above embodiments when executing a computer program.
[0112] The device used to determine the failure of the operation provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0113] The processor 31 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 31 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 31 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 31 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0114] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 30 is used to store at least the following computer program, which, after being loaded and executed by the processor 31, is capable of implementing the relevant steps of the method for determining operation failure disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 30 may also include an operating system and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, the method for determining operation failure.
[0115] In some embodiments, the device that determines that the operation has failed may further include a display screen, an input / output interface, a communication interface, a power supply, and a communication bus.
[0116] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the device used to determine if the operation has failed, and may include more or fewer components than shown.
[0117] The device for determining operation failure provided in this application includes a memory 30 and a processor 31. When the processor 31 executes the program stored in the memory 30, it can implement a method for determining operation failure.
[0118] Since the aforementioned devices that determine operation failure can also use the method provided in this application for determining operation failure, this method involves the following steps: establishing a map cache container and a rados object based on the operation, with a one-to-one correspondence between the map cache container and the rados object; obtaining the operation information of the operation, which includes at least the operation result; storing the operation information in the map cache container; flushing the operation information down and storing it in the rados object; and determining that the operation has failed when the rados object contains operation information indicating that the operation has failed. Because the established map cache container can store all operation information of the operation and store it together in the established rados object, if the rados object is found to contain operation information indicating that the operation has failed, then the operation has failed. In this case, technicians do not need to analyze whether the operation has failed through log files, improving error checking efficiency. Furthermore, because technicians are promptly informed of errors in the operation, it avoids the accumulation of large amounts of information and / or data in the system, thus improving storage efficiency.
[0119] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.
[0120] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0121] The foregoing provides a detailed description of a method, apparatus, device, and medium for determining operation failure as provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0122] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for determining if an operation (op) has failed, characterized in that, include: A map cache container and a rados object are created based on the op operation, and the map cache container and the rados object correspond one-to-one. Obtain the operation information of the op operation, wherein the operation information includes at least the operation result; The operation information is stored in the map cache container; The operation information is flushed down and stored in the rados object; When the rados object contains the operation information indicating that the op operation failed, the op operation is determined to have failed. After obtaining the operation information of the op operation, and before storing the operation information in the map cache container, the method further includes: Determine whether the operation result indicates that the operation has been completed; If so, proceed to the step of storing the operation information in the map cache container; If not, return to the step of obtaining the operation information of the op operation; The step of flushing and storing the operation information in the rados object includes: Send the operation information and the original information in the rados object to osd; The operation information and the original information are superimposed on the OSD; The superimposed operation information and the original information are transmitted to the rados object and stored. The process of creating the map cache container and rados object based on the op operation includes: The map cache container is established according to the type of the op operation; The rados objects of the omap structure are created one by one according to the mapping relationship in the map cache container.
2. The method for determining operation failure according to claim 1, characterized in that, If it is confirmed that the operation result indicates that the operation has been completed, the following steps are also included: Output a message indicating that the operation has been completed.
3. The method for determining operation failure according to claim 1, characterized in that, After determining that the op operation has failed, the method further includes: Output alarm information.
4. The method for determining operation failure according to claim 1, characterized in that, The number of op operations, the number of map cache containers, and the number of rados objects are all set to 3.
5. An apparatus for determining if an operation has failed, characterized in that, include: The first creation module is used to create a map cache container and a rados object according to the op operation, wherein the map cache container and the rados object correspond one-to-one. The acquisition module is used to acquire the operation information of the op operation, the operation information including at least the operation result; A storage module is used to store the operation information in the map cache container; The down-fetching module is used to down-fetch the operation information and store it in the rados object; The determination module is used to determine that the op operation has failed when the rados object contains operation information that indicates the failure of the op operation; Also includes: The judgment module is used to determine whether the operation result indicates that the op operation has been completed; if yes, the storage module is triggered; if no, the acquisition module is triggered. The brush module includes: The sending module is used to send the operation information and the original information in the rados object to the osd; An overlay module is used to overlay the operation information and the original information into the OSD; The transmission module is used to transmit the superimposed operation information and the original information to the rados object and store them; The first establishment module includes: The second creation module is used to create the map cache container according to the type of the op operation; The third module is used to create the rados objects of the omap structure one by one according to the mapping relationship based on the map cache container.
6. A device for determining if an operation has failed, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for determining an op operation failure as described in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for determining an operation failure as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Implementation method for storing, integrally uploading and segmentally checking based on Ceph object
CN111274616A
Distributed object storage system write cache method and device
CN111736767A