Method for recovering from a failure during garbage collection in a system, computer program product, and apparatus for recovering from a failure during garbage collection in a system - Patents.com

By recording specific offsets during the garbage collection transaction and skipping the initial record in the target slot, the recovery problem when the system crashes during the garbage collection process is solved, and the stability and reliability of the storage system are achieved.

JP7672224B2Active Publication Date: 2025-05-07INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2020543361
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-02-23
Filing Date
2019-02-19
Publication Date
2025-05-07
Estimated Expiration
2039-02-19

AI Technical Summary

Technical Problem

During the garbage collection process, when the system crashes, the recovery fails, resulting in the storage system being unable to recover effectively.

Method used

The system recovery is achieved by recording a specific offset during the garbage collection transaction and skipping the record of the initial offset to the end of the target slot in the target slot.

Benefits of technology

It effectively solves the recovery problem when the system crashes during garbage collection, and ensures the stability and reliability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007672224000001
    Figure 0007672224000001
  • Figure 0007672224000002
    Figure 0007672224000002
  • Figure 0007672224000003
    Figure 0007672224000003
Patent Text Reader

Abstract

【assignment】 One embodiment provides a method for recovering from a failure during garbage collection in a system, comprising: performing, by a processor, transactional time-series garbage collection; recording a specific offset in a target slot of a log structure associated with the garbage collection transaction; skipping records from an initial offset in the target slot of the log structure recorded by the garbage collection transaction to the end of the target slot. [Selection diagram] Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The invention generally relates to a log structure. was made The purpose of this is to manage the storage system. In particular, it is to manage the garbage collection process in the system. failure Provides recovery from [Background technology]

[0002] Typical log structure was made Storage systems store record data in a chronological order in a "log." These typical systems allow basic primitive operations such as insert, update, delete, and read. Each update to the data results in a new record being inserted at the end of the "log." Each delete results in a tombstone object being inserted at the end of the log. Additionally, a background garbage collection (GC) process compacts data that does not contain valid data and reclaims space. Summary of the Invention [Problem to be solved by the invention]

[0003] However, during garbage collection failure Recovery from can be problematic. Thus, there is a need in the art to address the aforementioned problems. [Means for solving the problem]

[0004] From a first aspect, the present invention provides a method for detecting garbage collection in a system. failureThe present invention provides a method for recovery from a garbage collection transaction, the method including: performing, by a processor, a time-ordered garbage collection transactionally; recording a particular offset in a target slot of a log structure associated with the garbage collection transaction; and skipping records from an initial offset in the target slot of the log structure recorded by the garbage collection transaction to an end of the target slot.

[0005] Viewed from a further aspect, the present invention provides an apparatus for performing time-ordered garbage collection in a transactional manner, the apparatus comprising: a memory for storing instructions; and a method for storing instructions for storing instructions for a garbage collection transaction in a target slot of a log structure associated with the garbage collection transaction. To The processor records a specific offset and skips records from the initial offset in the target slot of the log structure recorded by the garbage collection transaction to the end of the target slot. failure and a processor that executes instructions for recovering from

[0006] In a further aspect, the present invention provides a method for detecting a garbage collection error during a garbage collection process in a system. failure The present invention provides a computer program product for recovery from a computer-readable storage medium that is readable by a processing circuit and stores instructions for execution by the processing circuit to perform a method that performs the steps of the invention.

[0007] Viewed from a further aspect, the present invention provides a computer program stored on a computer readable medium and loadable into an internal memory of a digital computer, said computer program comprising software code portions for performing the steps of the invention when said program is run on a computer.

[0008] The embodiment is in chronological order. To Log Structure was made Garbage collection in key-value stores failure One embodiment relates to a method for recovering from a chronological garbage collection transactionally, the method comprising: To Log Structure was made Garbage collection in key-value stores failure Provides a method for recovery from a garbage collection transaction in a targeted slot in the log structure associated with the transaction. To Specific Offset but Records are skipped from the initial offset in the target slot of the log structure recorded by the garbage collection transaction to the end of the target slot.

[0009] These and other features, aspects, and advantages of the present invention will become apparent with reference to the following description, appended claims, and accompanying drawings.

[0010] Embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which: [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 illustrates a cloud computing environment according to an embodiment. [Diagram 2] FIG. 2 illustrates a set of abstract model layers according to an embodiment. [Diagram 3] FIG. 2 illustrates a network architecture for retrospective snapshots in a log-structured storage system, according to an embodiment. [Figure 4] FIG. 2 illustrates a representative hardware environment that may be associated with the server and / or client of FIG. 1, according to an embodiment. [Diagram 5]FIG. 2 is a block diagram illustrating a processor for recovery from a failure during garbage collection in a chronologically ordered, log-structured key-value store in a log-structured storage system, according to an embodiment. [Figure 6] FIG. 2 illustrates an initial system state during garbage collection according to an embodiment. [Figure 7] FIG. 2 illustrates a system state upon system crash during garbage collection according to an embodiment. [Figure 8] FIG. 1 illustrates a system state after a garbage collection rollback, according to an embodiment. [Figure 9] FIG. 13 illustrates a state diagram of a system repairing a broken back chain during a garbage collection rollback, according to an embodiment. [Figure 10] 1 is a block diagram of a process for recovery from a failure during garbage collection in a chronologically ordered, log-structured key-value store, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The description of the various embodiments is presented for illustrative purposes, but is not intended to be exhaustive or to be limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein has been selected to best explain the principles of the embodiments, practical applications, or technical improvements to the technology found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

[0013] Although this disclosure includes a detailed description of cloud computing, it is to be understood that implementation of the teachings recited herein is not limited to a cloud computing environment. Rather, embodiments of the present invention may be implemented in conjunction with any other type of computing environment now known or later developed.

[0014] One or more embodiments may be chronologically ordered. To Log Structure was made During garbage collection (GC) in key-value stores failure One embodiment relates to a method for recovering from a time-ordered garbage collection by a processor, the method comprising: To Log Structure was made GC in Key-Value Stores failure Provides a method for recovery from a GC transaction. 、 In the target slot of the log structure To Specific Offset but Records are skipped from the initial offset in the target slot of the log structure recorded by the garbage collection transaction to the end of the target slot.

[0015] Cloud computing is a model of service delivery for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines (VMs), and services) that can be rapidly provisioned and released with minimal administrative effort or interaction with a service provider. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.

[0016] The characteristics are as follows: On-Demand Self-Service: Cloud consumers can unilaterally provision computing capabilities such as server time and network storage as needed and automatically, without the need for human interaction with the service provider. Broad network access: Capabilities are available over the network and accessed through standard mechanisms that facilitate use by heterogeneous thin-client or thick-client platforms (e.g., cell phones, laptops, and PDAs). Resource Sharing: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated according to demand. Location independence is implied in that consumers generally do not have control or knowledge over the exact location of the resources provided, but may be able to specify the location at a higher level of abstraction (e.g., country, state, or data center). Rapid Scalability: Capabilities can be quickly and elastically provisioned, in some cases automatically, to instantly scale out, and quickly released to instantly scale in. To the consumer, the capabilities available for provisioning often appear unlimited and can be purchased in any quantity at any time. Services are meterable: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, active consumer accounts). Resource usage may be monitored, controlled, and reported, thereby providing transparency to both providers and consumers of the services used.

[0017] The service model is as follows: Software as a Service (SaaS): The capability provided to the consumer is the ability to use the provider's applications running on a cloud infrastructure. The applications are accessible from a variety of client devices through thin-client interfaces such as web browsers (e.g., web-based email). The consumer does not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited consumer-specific application configuration settings. Platform as a Service (PaaS): The capability offered to the consumer is the ability to deploy applications that the consumer creates or acquires, generated using programming languages ​​and tools supported by the provider, onto a cloud infrastructure. The consumer does not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but does have control over the deployed applications and, to the extent possible, the application hosting environment configuration. Infrastructure as a Service (IaaS): The capability provided to the consumer is the ability to supply processing, storage, networking, and other basic computing resources on which the consumer can deploy and run any software, which may include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure, but does have control over the operating systems, storage, deployed applications, and possibly limited control over select networking components (e.g., host firewalls).

[0018] The layout model is as follows: Private Cloud: The cloud infrastructure is operated exclusively for an organization. The cloud infrastructure may be managed by the organization or a third party and may be on-premise or off-premise. Community Cloud: The cloud infrastructure is shared by multiple organizations to support a specific community with shared concerns (e.g., mission, security requirements, policy, and compliance considerations). The cloud infrastructure may be managed by the organization or a third party and may reside on-premise or off-premise. Public Cloud: The cloud infrastructure is made available to the general public or large industry organizations and is owned by an organization that sells cloud services. Hybrid Cloud: The cloud infrastructure is a mixture of two or more clouds (private, community, or public) that remain a unique entity but are joined by standardized or proprietary technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).

[0019] A cloud computing environment is stateless, low-coupling, modular, and service-oriented with a focus on semantic interoperability. At the heart of cloud computing is an infrastructure that includes a network of interconnected nodes.

[0020] Referring now to FIG. 1, an exemplary cloud computing environment 50 is shown. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10 with which local computing devices used by cloud consumers, such as a personal digital assistant (PDA) or cell phone 54A, a desktop computer 54B, a laptop computer 54C, or an automobile computer system 54N, or combinations thereof, may communicate. The nodes 10 may communicate with each other. They may be physically or virtually grouped in one or more networks, such as a private, community, public, or hybrid cloud, or combinations thereof, as described above (not shown). This allows the cloud computing environment 50 to offer infrastructure, platform, and / or software as a service without the cloud consumer having to maintain resources on the local computing device. The types of computing devices 54A-N shown in FIG. 2 are intended to be exemplary only, and it is understood that the computing node 10 and cloud computing environment 50 may communicate with any type of computerized device via any type of network and / or network addressable connections (e.g., using a web browser).

[0021] Referring now to Figure 2, a set of functional abstraction layers provided by cloud computing environment 50 (Figure 1) is shown. It should be understood in advance that the components, layers, and functions shown in Figure 2 are intended to be merely exemplary, and that embodiments of the invention are not limited thereto. As shown, the following layers and corresponding functions are provided:

[0022] The hardware and software layer 60 includes hardware and software components. Examples of hardware components include mainframes 61, Reduced Instruction Set Computer (RISC) architecture based servers 62, servers 63, blade servers 64, storage devices 65, and networks and networking components 66. In some embodiments, the software components include network application server software 67 and database software 68.

[0023] The virtual layer 70 provides an abstraction layer within which the following examples of virtual entities may be provided: virtual servers 71, virtual storage 72, virtual networks including virtual private networks 73, virtual applications and operating systems 74, and virtual clients 75.

[0024] In one example, the management layer 80 may provide the functions described below. Resource provisioning 81 provides dynamic procurement of computing and other resources utilized to execute tasks within the cloud computing environment. Metering and pricing 82 provides cost tracking as resources are utilized within the cloud computing environment and provides billing or charging for the consumption of these resources. In one example, these resources may include application software licenses. Security provides identity verification for cloud consumers and tasks as well as protection for data and other resources. User portal 83 provides consumers and system administrators with access to the cloud computing environment. Service level management 84 provides cloud computing resource allocation and management such that requested service levels are met. Service level agreement (SLA) planning and fulfillment 85 provides pre-positioning and procurement of cloud computing resources where future requirements are anticipated according to SLAs.

[0025] The Workload Layer 90 provides examples of functionality for which a cloud computing environment may be utilized. Examples of workloads and functions that may be provided from this layer include mapping and navigation 91, software development and lifecycle management 92, virtual classroom instructional delivery 93, data analytics processing 94, transaction processing 95, and chronological ordering. To Log Structure was made During GC in key-value store processing failure As mentioned above, all of the above examples described with respect to Figure 2 are merely examples and the invention is not limited to these examples.

[0026] It is understood that all functions of one or more embodiments described herein may typically be performed by the processing system 300 (FIG. 3) or the autonomous cloud environment 410 (FIG. 4), which may be tangibly embodied as hardware processors and in modules of program code. However, this need not be the case for non-real-time processing. Rather, for non-real-time processing, the functionality enumerated herein may be performed / implemented and / or enabled by any of the layers 60, 70, 80, and 90 shown in FIG. 2.

[0027] Although this disclosure includes detailed descriptions of cloud computing, it is reaffirmed that the implementation of the teachings recited herein is not limited to a cloud computing environment. Rather, embodiments of the present invention may be implemented using any type of clustered computing environment now known or later developed.

[0028] FIG. 3 illustrates a network architecture 300, according to one embodiment. As shown in FIG. 3, a plurality of remote networks 302 are provided, including a first remote network 304 and a second remote network 306. A gateway 301 may be coupled between the remote network 302 and a proximate network 308. In the context of this network architecture 300, the networks 304, 306 may each take any form, including but not limited to a LAN, a WAN such as the Internet, a Public Switched Telephone Network (PSTN), an internal telephone network, and the like. In use, the gateway 301 serves as an ingress point from the remote network 302 to the proximate network 308. In this manner, the gateway 301 may function as a router capable of directing a given data packet arriving at the gateway 301, and a switch that provides the actual path in and out of the gateway 301 for a given packet.

[0029] Further included is at least one data server 314 coupled to the proximate network 308, the data server 314 being accessible from the remote network 302 via the gateway 301. It should be noted that the data server 314 may include any type of computing device / groupware. Coupled to each data server 314 are a number of user devices 316. Such user devices 316 may include desktop computers, laptop computers, handheld computers, printers, or any other type of logic-containing device, or combinations thereof. It should be noted that the user devices 311 may also be directly coupled to any of the networks in some embodiments.

[0030] For example, a peripheral device 320 or a series of peripheral devices 320, such as a facsimile machine, a printer, a scanner, a hard disk drive, a networked or local storage unit or system, or both, may be coupled to one or more of the networks 304, 306, 308. It should be noted that the database and / or additional components may be utilized with or integrated into any type of network element coupled to the networks 304, 306, 308. In the context of this description, a network element may refer to any component of a network.

[0031] According to some approaches, the methods and systems described herein may be implemented using and / or on virtual systems and / or systems emulating one or more other systems, such as a UNIX system emulating an IBM® z / OS® environment, a UNIX system virtually hosting a MICROSOFT® WINDOWS® environment, a MICROSOFT® WINDOWS® system emulating an IBM® z / OS® environment. This virtualization and / or emulation may be implemented through the use of VMWARE software in some embodiments. Microsoft and Windows® are trademarks of Microsoft Corporation in the United States, other countries, or both. IBM and z / OS are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.

[0032] FIG. 4 illustrates a representative hardware system 400 environment associated with a user device 416 and / or server 314 of FIG. 3, according to one embodiment. In one example, the hardware configuration includes a workstation having a central processing unit 410, such as a microprocessor, and several other units interconnected via a system bus 412. The workstation illustrated in FIG. 4 may include a random access memory (RAM) 414, a read only memory (ROM) 416, an I / O adapter 418 for connecting peripheral devices, such as a disk storage unit 420, to the bus 412, a user interface adapter 422 for connecting a keyboard 424, a mouse 426, a speaker 428, a microphone 432, and / or other user interface devices, such as a touch screen, a digital camera (not shown), to the bus 412, a communications adapter 434 for connecting the workstation to a communications network 435 (e.g., a data processing network), and a display adapter 436 for connecting the bus 412 to a display device 438.

[0033] In one example, an operating system such as MICROSOFT® WINDOWS® Operating System (OS), MAC OS, UNIX® OS, etc. may reside thereon. In one embodiment, system 400 employs a POSIX® based file system. It is to be understood that other examples may be implemented on platforms and operating systems other than those described. Such other examples may include operating systems written using JAVA®, XML, C, or C++ languages, or combinations thereof, or other programming languages, along with object-oriented programming methodologies. Object-oriented programming (OOP), which is increasingly being used to develop complex applications, may also be used. UNIX® is a registered trademark of The Open Group in the United States and other countries. Java® and all Java®-based trademarks and logos are trademarks or registered trademarks of Oracle and / or its affiliates.

[0034] FIG. 5 illustrates a chronological order in a log-structured storage system according to an embodiment. To Log Structure was made GC in Key-Value Stores failureA block diagram of a processing node 500 for recovery from a log. The term "garbage collection" (GC) refers to reclaiming "disk space" occupied by stale entries in the log. For example, when a record is inserted, an entry is added to the end of the log. When an identical record is deleted, a discarded entry is added to the end of the log. The discarded entry is the original location on disk of the data generated by the insert. The disk space occupied by the original inserted record may be garbage collected (unless the system maintains an older version). Stale data may be the result of a deleted or updated record. An update results in stale data because the older version of the data maintained in the log is no longer needed. In a log-structured store, every insert, update, or delete operation Note that this results in the record being inserted at the end of the log.

[0035] In one embodiment, processing node 500 includes one or more processors 510, a garbage collection interface 530, and a memory 520. In one embodiment, each processor 510 stores chronologically ordered data in a log-structured storage system. To Log Structure was made In a key-value store, GC failure Perform the process to recover from the

[0036] In one embodiment, a processing node 500 in a log-structured storage system failure When recovering from a , the in-memory index needs to be rebuilt, and to do so, the log in memory 520 is replayed from beginning to end. failureIf it occurs during the intermediate stage of the GC operation, cleanup is necessary. The cleanup may be executed quickly by the processor 510 and the garbage collection interface 530, or may ultimately be performed at a delayed time. Without cleanup, additional garbage is generated, which must ultimately be processed and can affect the recovery time. The cleanup must take into account any "dirty reads". Updates / deletions that may have occurred during the GC operation operation may indicate the "garbage collection target slot". Therefore, in addition to rolling back the content on the target slot, the GC rollback must "repair" the broken chain.

[0037] In one embodiment, the GC is executed as a transaction by the garbage collection interface 530. Transaction processing divides information processing into indivisible operations called individual transactions. Each transaction must succeed or fail as a complete unit and can never complete only partially. In one embodiment, the garbage collection interface 530 failure executes a rollback of the GC transaction in the case of. The GC transaction record includes <target slot (TS), sacrifice slot (VS), start offset (BO) within the target slot>. In one embodiment, the GC target area is the area of <BO, end of the slot> on the GC target slot. The GC transaction record starts and ends on the GC transaction.

[0038] In one embodiment, the garbage collection interface 530 performs a GC rollback as follows: The garbage collection interface 530 reads the recovery log to identify incomplete GC target slots and victim slots. The garbage collection interface 530 starts index rebuilding as follows: 1) if the slot is a GC target slot and offset >= BO, skip to the end of the slot and continue to the next slot; 2) if the record (update or delete) points to the GC target area (back pointer), a) read the location pointing into the GC target area, and b) insert a new tombstone entry to hold the back pointer (pointing to the previous address) to the record in the GC target area. The garbage collection interface 530 then finishes the index rebuilding, zeros out the target slot TS from offset BO to the end of the slot, and inserts an "abort record for garbage collection transaction" into the recovery log. At the end of recovery, the system state is consistent with the state of the system before the GC process.

[0039] 6 illustrates an example 600 of an initial system state during GC, according to an embodiment. An index 610 is shown on the right side of the example 600, and includes keys in the left column and mappings in the right column. In one example, K1 points to slot 1 620 and offset 2, K2 points to slot 1 620 and offset 3, etc. In the example 600, the slots shown include slot 1 620, slot 51 630, and slot 3 640. The victim slot VS is shown as slot 3 640, and the target slot TS is shown as slot 51 630. A back pointer chain 650 shows a pointer from k8 in slot 3 640 to k8 in slot 1 620.

[0040] 7 illustrates an example 700 of a system state upon a system crash during GC, according to an embodiment. In the example 700, slot 4 750 shows k8 and a back pointer chain 770 that points to slot 51 630, and k8 in slot 51 630 has a forward pointer chain 760 that points to slot 3 640 and offset 1.

[0041] 8 illustrates an example 800 of a system state after a GC rollback, according to an embodiment. As shown, the back-pointer chain 770 is broken from slot 4 750 to slot 51 630.

[0042] 9 illustrates an example 900 of a system state for repairing a broken back chain during a GC rollback, according to an embodiment. As shown, back pointer chain 770 is broken. In example 900, to repair the broken back chain 770, discarded K8 in slot 4 750 adds a back pointer chain 960 that points to slot 3 640, offset 1.

[0043] FIG. 10 illustrates a chronological order according to one embodiment. To Log Structure was made GC in Key-Value Stores failure 5 illustrates a block diagram of a process 1000 for recovery from a GC transaction. In one embodiment, block 1010 in process 1000 includes performing a time-series GC transactionally by a processor (e.g., by processor 510 of FIG. 5). In block 1020, process 1000 performs a GC transaction in a target slot (TS) of a log structure associated with the GC transaction. To At block 1030, the process 1000 records the specific offset recorded by the GC transaction. Ta , skip records from the initial offset in the log structure's TS to the end of the TS.

[0044] In one embodiment, in process 1000, the system performs a chronological To Log Structure was made In one embodiment, the process 1000 may further include recording the GC transactions on a separate recovery log. The process 1000 may record any outstanding GC operations (e.g., We're screwed The process 1000 may additionally include zeroing out a region of a log structure TS associated with the GC transaction. In one embodiment, the process 1000 may include aborting the GC transaction by writing an abort record to a recovery log.

[0045] In one embodiment, the process 1000 includes: After failing to To system to a consistent state Preserves chronological order by restoring On the other hand, Log Structure was made In the key-value store I At the same time as GC Go ahead update operation of offer This may include:

[0046] In one embodiment, the process 1000 includes: Failed to Later system to a consistent state Preserves chronological order by restoring On the other hand, Log Structure was made In the key-value store I At the same time as GC Go ahead delete operation of offer This may include:

[0047] As will be appreciated by one of ordinary skill in the art, aspects of the present invention may be embodied as a system, method, or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, all of which may be generally referred to herein as a "circuit," "module," or "system." Additionally, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.

[0048] Any combination of one or more computer readable media may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0049] A computer-readable signal medium may include a propagated data signal having computer-readable program code embodied therein, for example in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including but not limited to electromagnetic, optical, or any suitable combination thereof. A computer-readable signal medium is not a computer-readable storage medium, but may be any computer-readable medium capable of communicating, propagating, or transporting a program for use by or in connection with an instruction execution system, apparatus, or device.

[0050] The program code embodied on the computer readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, fiber optic cable, RF, etc., or any suitable combination of the foregoing.

[0051] Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java®, Smalltalk, C++, and conventional procedural programming languages ​​such as the “C” programming language or similar programming languages. The program code may run completely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN). Alternatively, the connection may be made to an external computer (e.g., through the Internet using an Internet Service Provider).

[0052] Aspects of the present invention are described below with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It is to be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by a processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowchart illustrations and / or block diagrams.

[0053] These computer program instructions may also be stored on a computer-readable medium capable of directing a computer, other programmable data processing device, or other device to function in a particular manner, such that the instructions stored on the computer-readable medium produce an article of manufacture including instructions that implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0054] The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to generate a computer-implemented process into a series of operational steps to be performed on the computer, other programmable apparatus, or other device, such that the instructions executing on the computer or other programmable apparatus provide a process for performing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0055] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in the reverse order depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or executes a combination of dedicated hardware and computer instructions.

[0056] Reference to an element in the singular in the claims is intended to mean "one or more" and not "one and only one" unless expressly stated otherwise. All structural and functional equivalents of the elements of the exemplary embodiments described above that are now known or that later become known to those skilled in the art are intended to be encompassed by the claims. No claim element herein should be construed under the provisions of 35 U.S.C. 112, sixth paragraph, unless the element is expressly recited using the phrase "means for" or "step for."

[0057] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," as used herein, indicate the presence of stated features, integers, steps, operations, elements, or components, or combinations thereof, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or collections thereof, or combinations thereof.

[0058] The corresponding structure, material, acts, and equivalents of all means-plus-function or step-plus-function elements in the following claims are intended to include any structure, material, or acts for performing a function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or to limit the invention to the disclosed form. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the invention. The embodiments have been selected and described in order to best explain the principles and practical applications of the invention, and to enable others skilled in the art to understand the invention in its various embodiments with various modifications suitable for the particular uses contemplated.

Claims

1. 1. A method for recovery from failures during garbage collection in a chronologically-ordered, log-structured key-value store in which every insert, update or delete operation is inserted as a record at the tail of a log, the chronologically-ordered log structure being in a log-structured storage system, the key-value store associating keys with values ​​indicating slots and their offsets, and in the chronologically-ordered, log-structured key-value store, every insert, update or delete operation causes a record to be inserted at the tail of the log, the method comprising: performing, by a processor, a time-series garbage collection transactionally, where each transaction succeeds or fails as a complete unit; and and when an update or delete operation occurs on a garbage collected slot during the garbage collection process, in addition to rolling back the contents on the garbage collected slot, repairing a broken back chain that pointed to the garbage collected slot, wherein the update or delete operation that occurred during the garbage collection process points to the garbage collected slot, and repairing the broken back chain includes, when a back pointer indicating an update or delete to a record corresponding to a key (hereinafter referred to as a "first key") that once existed in a garbage collected area is set in a record of a slot next to the garbage collected slot, setting a new discarded entry in the slot next to the garbage collected slot in order to repair the back pointer that was broken due to the record being deleted by the rollback, and adding a new back pointer from the discarded entry to a record corresponding to a key (hereinafter referred to as a "second key") in the slot next to the garbage collected slot, wherein the first key and the second key are the same. The method comprising:

2. 2. The method of claim 1, further comprising: preserving chronological order by restoring the system to a consistent state after a failure during the garbage collection process while providing update operations that proceed concurrently with GC in a log-structured key-value store.

3. 3. The method of claim 2, further comprising providing deletion operations that proceed concurrently with GC in a log-structured key-value store while preserving chronological order by restoring the system to a consistent state after a failure during the garbage collection process.

4. 1. A computer program for recovery from a failure during garbage collection in a system, comprising: A computer program product which, when executed by a computer, causes the computer to carry out the method according to any one of claims 1 to 3.

5. A computer program loadable into an internal memory of a computer, said computer program causing said computer to carry out the method according to any one of claims 1 to 3 in response to said program being executed on the computer.

6. 1. An apparatus for recovery from failures during garbage collection in a chronologically-ordered, log-structured key-value store in which every insert, update or delete operation inserts a record at the tail of a log, the chronologically-ordered log structure being in a log-structured storage system, the key-value store associating keys with values ​​indicating slots and their offsets, and in the chronologically-ordered, log-structured key-value store, every insert, update or delete operation inserts a record at the tail of the log, the apparatus comprising: A memory for storing instructions; Performing time-series garbage collection transactionally, where each transaction either succeeds or fails as a complete unit, and a processor that executes the instructions for repairing, in addition to rolling back contents on a garbage collected slot when an update or delete operation occurs on the garbage collected slot during the garbage collection process, repairing a broken back chain that pointed to the garbage collected slot, wherein the update or delete operation that occurred during the garbage collection process points to the garbage collected slot, and repairing the broken back chain includes setting a new discarded entry in the discarded entry to repair a back pointer that was broken when the record in the next-next slot of the garbage collected slot has a back pointer that indicates an update or delete to a record corresponding to a key (hereinafter referred to as a "first key") that once existed in the garbage collected area, and adding a new back pointer from the discarded entry to a record corresponding to a key (hereinafter referred to as a "second key") in the next slot of the garbage collected slot, wherein the first key and the second key are the same; The device comprising:

7. The processor, To provide update operations that proceed concurrently with GC in a log-structured key-value store while maintaining chronological order by restoring the system to a consistent state after a failure during garbage collection. The apparatus of claim 6 , further comprising instructions comprising:

8. The processor, To provide a deletion operation that proceeds concurrently with GC in a log-structured key-value store while maintaining chronological order by restoring the system to a consistent state after a failure during garbage collection. The apparatus of claim 7 , further comprising instructions comprising:

Citation Information

Patent Citations

  • Computer programs, systems and methods for managing data in storage

    JP2018509695A

  • System for chronologically ordered out-of-place updates, method for chronologically ordered out-of-place updates, and computer program for chronologically ordered out-of-place updates

    JP2021515299A

  • Log-structured garbage collection

    US20140136575A1

  • Managing data in storage according to a log structure

    US20160246830A1

  • Efficient index checkpointing in log-structured object stores

    US20170068599A1