WO2021248640A1 - 一种多版本文件的操作方法、系统及装置 - Google Patents

一种多版本文件的操作方法、系统及装置 Download PDF

Info

Publication number
WO2021248640A1
WO2021248640A1 PCT/CN2020/103447 CN2020103447W WO2021248640A1 WO 2021248640 A1 WO2021248640 A1 WO 2021248640A1 CN 2020103447 W CN2020103447 W CN 2020103447W WO 2021248640 A1 WO2021248640 A1 WO 2021248640A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
version
header
operation log
metadata
Prior art date
Application number
PCT/CN2020/103447
Other languages
English (en)
French (fr)
Inventor
孙细妹
Original Assignee
厦门网宿有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 厦门网宿有限公司 filed Critical 厦门网宿有限公司
Publication of WO2021248640A1 publication Critical patent/WO2021248640A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of Internet technology, in particular to a method, system and device for operating multi-version files.
  • each multi-version file requires multiple access to the bucket index.
  • each operation is usually mutually exclusive. Therefore, when accessing bucket index, the operation of different multi-version files is actually a serial operation, which will greatly affect the operation efficiency of multi-version files.
  • the purpose of this application is to provide a method, system and device for operating multi-version files, which can improve the operating efficiency of multi-version files.
  • the present application provides a method for operating a multi-version file.
  • the method includes: configuring an object logical header for the multi-version file, where the object logical header is used to record metadata of the multi-version file; Among them, different multi-version files have different object logic headers; when an operation is performed on the target object in the multi-version file, an operation log of the target object is generated in the object logic header, and the target object After completing the operation, perform a completion action matching the operation log on the instance of the target object in the object logic header; update the version information of the multi-version file in the object logic header, where all The version information is at least used to characterize the number of the latest version and the object pointing to the latest version.
  • an operating system for a multi-version file includes: an object logical header configuration unit configured to configure an object logical header for the multi-version file, and the object logical header is used for Record the metadata of the multi-version file; wherein, different multi-version files have different object logical heads; the object operation unit is used for operating on the target object in the multi-version file, in the object logical head
  • the operation log of the target object is generated in the operation log, and after the operation is completed by the target object, a completion action that matches the operation log is performed on the instance of the target object in the object logic head;
  • a version information update unit Used to update the version information of the multi-version file in the object logic header, where the version information is used to at least characterize the number of the latest version and point to the latest version of the object.
  • another aspect of the present application also provides a multi-version file operating device.
  • the device includes a memory and a processor.
  • the memory is used to store a computer program that is executed by the processor. , To achieve the above-mentioned multi-version file operation method.
  • different object logic headers can be configured, and the object logic header can record the metadata of the corresponding multi-version files.
  • the corresponding operation log can be generated in the object logic header, and after the operation of the target object is completed, the matching operation can be performed on the target object instance in the object logic header. Complete the action.
  • the version information of the multi-version file can be updated in the object logic header. It can be seen from the above that different multi-version files can manage metadata through their own object logic headers, so that when the operation of the target object occurs, there is no need to wait for the operation flow of other multi-version files, which can greatly improve the performance of multi-version files. Operational efficiency.
  • FIG. 1 is a schematic diagram of the steps of a multi-version file operation method in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of functional modules of an operating system of multiple versions of files in an embodiment of the present invention
  • Fig. 3 is a schematic structural diagram of a multi-version file operating device in an embodiment of the present invention.
  • the multi-version file operation method provided in this application can be improved for the existing distributed object storage system, thereby solving the problem of low efficiency of multi-version file operation.
  • the operation method of a multi-version file provided by an embodiment of the present application may include the following multiple steps.
  • S1 Configure an object logic header for a multi-version file, where the object logic header is used to record metadata of the multi-version file; wherein, different multi-version files have different object logic headers.
  • each multi-version file can be configured with its own object logic head (olh), in which the metadata of the multi-version file can be recorded.
  • object logic head in which the metadata of the multi-version file can be recorded.
  • the configured object logic header can contain three data types.
  • the first type of data can be used to store the key-value pairs of the object
  • the second type of data can be used to store the extended attributes of the object
  • the third type of data can be used to store the extended attributes of the object.
  • Class data can be used to store object data.
  • the above three data types may be omap type, attr type, and data type, respectively.
  • the omap type can store the key-value pairs of the object through a key-value database (RocksDB, MangoDB, etc.)
  • the attr type can store the extended attributes of the object
  • the data type can store the object data.
  • the first type of data can also include a first sub-data type and a second sub-data type, where the first sub-data type can be used to store the latest version number and point to the latest version of the object, and the second sub-data type Data types can be used to store operation logs and object version instances.
  • the extended attributes of the second type of data storage can include the number of the latest version, the object of the latest version, and whether the object of the latest version is a deleted instance. In this way, the second type of data can be used to store the number of the latest version and point to the latest version. The object and the object marked with the latest version are deleted instances.
  • the two subtypes of the omap type and the extended attributes stored by the attr type can be as shown in Table 1 and Table 2:
  • the object logic header of the multi-version file can also contain fewer or more data types, and the functions of each data type can also be changed according to actual scenarios.
  • those skilled in the art should know that under the premise of understanding the essence of the technical solution of this application, reasonable changes to the form of the object logic header should also fall within the protection scope of this application.
  • Atomic operations are operations that will not be interrupted by the thread scheduling mechanism. These atomic operations can perform operations such as deleting and uploading objects for multi-version files, and can write operation logs to or delete operation logs from the object logical headers, and can perform version instances of the objects in the object logical headers Perform operations, etc.
  • these atomic operations can be used to perform processes such as uploading or deleting files.
  • the operation log of the target object can be generated in the object logic header of the multi-version file.
  • the previously generated operation log of the target object can include information such as the version number of the operation, whether the operation is marked with a delete tag, and so on. Through the combination of these information, the operation log can be converted into the corresponding object's operation log. Version examples. After the version instance of the object is obtained by conversion, the version instance of the object can be written into the object logic header, thereby completing the metadata modification.
  • the corresponding operation log is also generated in the object logic header. Later, when the target object is deleted from the distributed object storage system, the instance of the target object can also be deleted from the logical header of the object according to the generated operation log, so that metadata changes can also be completed.
  • the completion action performed in the object logic head is also different. If the operation log indicates that the target object is added to the multi-version file, the completed action performed may be to generate an instance of the target object according to the operation log, and store the instance of the target object in the object logic header. If the operation log indicates that the target object is deleted in the multi-version file, the completed action performed may be to delete the instance of the target object in the object logic header. In this way, after the target object completes the operation, a completion action that matches the operation log can be performed on the instance of the target object in the object logic header.
  • the operation log characterizes the deletion of the target object in the multi-version file
  • the instance of the target object is deleted in the object logic header
  • the current multi-version document All objects in the version file have been deleted.
  • the object logical header of the multi-version file can also be deleted, so that the metadata can be consistent with the actual data of the multi-version file.
  • Table 5 Schematic table of concurrent operations for adding and deleting objects
  • VA is deleted from the original objects VA and VB objects in the multi-version file, and the object VC is newly added.
  • the multi-version file contains at least the objects VB and VC, and here and
  • the object VA, object VB, object VC, object VE, and object VF used for illustration in other paragraphs in this article all represent different versions of the same multi-version file.
  • Table 6 Schematic table of operations for concurrently deleting two objects
  • the object logic header can also be deleted.
  • the object logic header can also be deleted.
  • the object logic header can also be deleted.
  • the delete object type when at least one of the operation types of the first target object and the second target object is the delete object type, after deleting the version instance of the object in the object logic header, if there are no other instances in the object logic header, You can delete the logical header of the object altogether.
  • S5 Update the version information of the multi-version file in the object logic header, where the version information is at least used to characterize the number of the latest version and the object pointing to the latest version.
  • the version information of the multi-version file can be updated.
  • the version information can include the number of the latest version, and the version information can mark the object to which the latest version points.
  • the number of the latest version can be gradually increased according to the number of operations on the object in the multi-version file. For example, if the original version number of a multi-version file is 1, then after adding objects VA and VB to the multi-version file in turn, the number of the latest version can be 3. Then, after deleting the object VB from the multi-version file and adding the object VC again, the number of the latest version can be 5.
  • the operation for the first target object and the operation for the second target object can be incrementally increased on the basis of the original version number, to Generate the latest version number.
  • the object pointed to by the latest version can be determined according to the operation type of the object. Specifically, according to the operation type of the first target object and the operation type of the second target object, the object of the latest version may be determined in the multi-version file, and the object of the latest version may be the object pointed to by the version information. For example, if the operation types of the first target object and the second target object are both the added object type, since the second target object was added last, the second target object may be determined as the object of the latest version.
  • the object of the latest version can be VB. If one of the operation types of the first target object and the second target object is the adding object type and the other is the deleting object type, the target object corresponding to the added object type may be determined as the object of the latest version.
  • the object of the latest version may be VC. If the operation types of the first target object and the second target object are both the delete object type, the newly added object can be queried among the remaining objects in the multi-version file, and the newly added object can be determined as the latest version of the object. For example, in Table 6, if VE and VF remain in the multi-version file after VB is deleted, and VF is added after VE, then the object of the latest version can be VF.
  • this information can be recorded in the version information of the updated multi-version file, thereby completing the version information update process.
  • the extended attributes in the logical header of the object can be updated.
  • the attr data type can be as shown in Table 7:
  • the metadata of the multi-version file can be stored in the corresponding object In the logical header, but at the same time, the metadata of the multi-version file also needs to be recorded in the bucket. Since the same metadata needs to be stored in two different areas, there may be a problem of inconsistency between the two metadata. In view of this, in this embodiment, an automatic repair function of metadata needs to be configured.
  • the operation log in the object logic header can be set to a pending state. Then, after the metadata operation log of the target object is generated in the storage area of the multi-version file, the metadata operation log may also be set to a pending state. After the target object completes the operation in the distributed object storage system, the corresponding operation log in the logical header of the object is deleted, and the state of the metadata operation log in the bucket is set to the completed state.
  • the metadata operation log of the target object can be detected in the bucket, and based on the current state of the metadata operation log, it is determined whether it is necessary to repair the metadata of the target object in the storage area and the logical header of the object. Specifically, if the current status of the metadata operation log is pending, you can go to the system to determine whether the target object has completed the operation in the multi-version file. If the operation has been completed, it is determined that the target object needs to be repaired in the bucket and the object logic header. Metadata in. If the current status of the metadata operation log is the completed status, it means that the metadata has been processed. At this time, it can be determined that there is no need to repair the metadata of the target object in the bucket and the logical header of the object.
  • the metadata operation log of the object exists in the bucket.
  • the storage status of the object can be queried in the system.
  • the system indicates that the object has been successfully uploaded, then the bucket can actively repair the metadata of the object in the bucket and the logical header of the object.
  • the corresponding completion action can be executed according to the operation log in the object logic header, and the operation log can be deleted.
  • This application also provides a multi-version file operating system, and the system includes:
  • the object logic header configuration unit is configured to configure an object logic header for a multi-version file, where the object logic header is used to record metadata of the multi-version file; wherein, different multi-version files have different object logic headers;
  • the object operation unit is configured to generate an operation log of the target object in the object logic header when performing operations on the target object in the multi-version file, and after the target object completes the operation, perform an operation on the object
  • the logical header performs a completion action that matches the operation log on the instance of the target object
  • the version information update unit is used to update the version information of the multi-version file in the object logic header, where the version information is used to at least characterize the number of the latest version and point to the latest version of the object.
  • the object operation unit includes:
  • the object adding module is configured to, if the operation log indicates that the target object is added to the multi-version file, generate an instance of the target object according to the operation log, and store the instance of the target object in the Object logic header;
  • the object deletion module is configured to delete the instance of the target object in the object logic header if the operation log indicates that the target object is deleted in the multi-version file.
  • the version information update unit includes:
  • the serial number update module is configured to operate on the first target object and the second target object concurrently for the multi-version file, and the second target object completes the operation after the first target object, and for the first target object The operation of and the operation of the second target object, the version number is incremented one by one on the basis of the original version number to generate the latest version number;
  • the information recording module is configured to determine the latest version of the object in the multi-version file according to the operation type of the first target object and the operation type of the second target object, and to generate the number of the latest version And the determined object of the latest version is recorded in the version information of the updated multi-version file.
  • system further includes:
  • the state setting unit is configured to set the operation log in the object logic header to a pending state; and generate a metadata operation log of the target object in the storage area of the multi-version file, and set the metadata
  • the data operation log is set to a pending state
  • the log operation unit is configured to delete the operation log in the logical header of the object after the target object completes the operation, and set the state of the metadata operation log in the storage area to a completed state.
  • system further includes:
  • the metadata repair unit is configured to detect the metadata operation log of the target object in the storage area, and determine whether it is necessary to repair the target object in the storage area and according to the current state of the metadata operation log.
  • the metadata in the logical header of the object.
  • this application also provides a multi-version file operating device, the device includes a memory and a processor, the memory is used to store a computer program, when the computer program is executed by the processor, the above The operation method of the multi-version file.
  • different object logic headers can be configured, and the object logic header can record the metadata of the corresponding multi-version files.
  • the corresponding operation log can be generated in the object logic header, and after the operation of the target object is completed, the matching operation can be performed on the target object instance in the object logic header. Complete the action.
  • the version information of the multi-version file can be updated in the object logic header, so as to point to the latest version object of the multi-version file.
  • different multi-version files can manage metadata through their own object logic headers, so that when the operation of the target object occurs, there is no need to wait for the operation process of other multi-version files, which can greatly improve the performance of multi-version files. Operational efficiency.
  • the bucket processes the metadata operation log, it can actively repair the metadata in the bucket and the logical header of the object according to the status of the metadata operation log and the actual operation result of the object in the system, thereby improving the distributed object storage system Availability and correctness.
  • the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

一种多版本文件的操作方法、系统及装置,其中,所述方法包括:为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头(S1);针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作(S3);在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象(S5)。该方案能够提高多版本文件的操作效率。

Description

一种多版本文件的操作方法、系统及装置 技术领域
本发明涉及互联网技术领域,特别涉及一种多版本文件的操作方法、系统及装置。
背景技术
在当前的分布式对象存储系统中,为了避免文件的误删和误改,通常会具备文件版本控制的功能。当开启了存储空间(bucket)版本控制功能后,针对文件的历次操作都可以通过历史版本的形式保存下来,从而形成多版本文件。
目前,在针对多版本文件进行操作时,可以在bucket index中写入操作日志,当针对多版本文件的操作完成之后,可以从bucket index中读取操作日志,并可以根据操作日志对多版本文件的头对象进行修改,当修改成功后,便可以从bucket index中删除对应的操作日志。
在实际应用中,同一时间会存在多个多版本文件需要执行上传或者删除的操作,每个多版本文件的操作过程都需要多次访问bucket index。同时,各个操作之间通常是互斥关系,因此在访问bucket index时,不同的多版本文件的操作实际上是串行操作,这样会极大地影响多版本文件的操作效率。
发明内容
本申请的目的在于提供一种多版本文件的操作方法、系统及装置,能够提高多版本文件的操作效率。
为实现上述目的,本申请一方面提供一种多版本文件的操作方法,所述方法包括:为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头;针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作;在所述对象逻辑头中更新 所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
为实现上述目的,本申请另一方面还提供一种多版本文件的操作系统,所述系统包括:对象逻辑头配置单元,用于为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头;对象操作单元,用于针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作;版本信息更新单元,用于在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
为实现上述目的,本申请另一方面还提供一种多版本文件的操作装置,所述装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的多版本文件的操作方法。
由上可见,本申请一个或者多个实施方式提供的技术方案,针对不同的多版本文件,可以配置不同的对象逻辑头,该对象逻辑头可以记录对应的多版本文件的元数据。这样,不同的多版本文件需要进行文件操作时,只需要访问自身的对象逻辑头,而不需要对同一个bucket index发起多次访问。具体地,当针对多版本文件操作目标对象时,可以在对象逻辑头中生成对应的操作日志,并且在该目标对象的操作完成后,可以在对象逻辑头中对目标对象的实例执行相匹配的完成动作。后续,在多版本文件当前的操作完成后,可以在对象逻辑头中更新多版本文件的版本信息。由上可见,不同的多版本文件可以通过自身的对象逻辑头来管理元数据,这样当发生目标对象的操作时,无需等待其它的多版本文件的操作流程,从而能够极大地提高多版本文件的操作效率。
附图说明
为了更清楚地说明本发明实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施方式中多版本文件的操作方法的步骤示意图;
图2是本发明实施方式中多版本文件的操作系统的功能模块示意图;
图3是本发明实施方式中多版本文件的操作装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施方式及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施方式仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。
本申请提供的多版本文件的操作方法,可以针对现有的分布式对象存储系统进行改进,从而解决多版本文件操作效率较低的问题。
请参阅图1,本申请一个实施方式提供的多版本文件的操作方法,可以包括以下多个步骤。
S1:为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头。
在本实施方式中,可以为各个多版本文件配置自身的对象逻辑头(object logic head,olh),在该对象逻辑头中,可以记录多版本文件的元数据。这样,不同的多版本文件,可以由自身的对象逻辑头管理元数据,而不需要通过统一的接口管理元数据。
在一个实施方式中,配置的对象逻辑头中可以包含三种数据类型,其中,第一类数据可以用于存储对象的键值对,第二类数据可以用于存储对象的扩展属性,第三类数据可以用于存储对象的数据。举例来说,上述的三种数据类型可以分别为omap类型、attr类型以及data类型。其中,omap类型可以通过键值对数据库(RocksDB、MangoDB等)的方式存储对象的键值对,attr类型可以存储对象的扩展属性,data类型可以存储对象的数据。
在一个实施方式中,第一类数据还可以包含第一子数据类型和第二子数据类型,其中,第一子数据类型可以用于存储最新版本的编号并指向最新版本的对象,第二子数据类型可以用于存储操作日志和对象的版本实例。此外,第二类数据存储的扩展属性,可以包含最新版本的编号、最新版本的对象以及最新 版本的对象是否为删除实例,这样,第二类数据可以用于存储最新版本的编号、指向最新版本的对象以及标注最新版本的对象是否为删除实例。
在一个具体应用示例中,omap类型的两个子类型以及attr类型存储的扩展属性可以如表1和表2所示:
表1 omap类型对应的两个子数据类型
Figure PCTCN2020103447-appb-000001
表2 attr类型存储的扩展属性描述
扩展属性名称 属性值说明
user.olh.latest_version 最新版本的编号
User.olh.target 最新版本的对象
user.olh.is_removed 最新版本的对象是否为删除实例
当然,在实际应用中,多版本文件的对象逻辑头中还可以包含更少或者更多的数据类型,各个数据类型具备的功能也可以根据实际场景进行变更。但本领域技术人员应当知晓,在理解了本申请技术方案精髓的前提下,对于对象逻辑头的形式进行合理的变更,也应当属于本申请的保护范围内。
S3:针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作。
在本实施方式中,在为多版本文件配置了对象逻辑头后,为保证能够对对象逻辑头进行有效的操作,可以进一步地设计多个原子操作(atomic operation)。原子操作是指不会被线程调度机制打断的操作。这些原子操作可以针对多版本文件进行对象的删除、上传等操作,并且可以向对象逻辑头中写入操作日志或者从对象逻辑头中删除操作日志,以及可以对对象逻辑头中的对象的版本实例进行操作等。
在一个具体应用示例中,设计的部分原子操作可以如表3所示:
表3 部分原子操作描述
Figure PCTCN2020103447-appb-000002
在本实施方式中,在针对多版本文件设计了原子操作后,可以利用这些原子操作,进行文件的上传或者删除等流程。具体地,如果需要向当前的多版本文件中添加目标对象,可以在该多版本文件的对象逻辑头中生成目标对象的操作日志。然后,当该目标对象被存入分布式对象存储系统的该多版本文件中后,就表明已经对目标对象完成了上传操作。此时,需要对多版本文件的对象逻辑头进行相应的改动。具体地,之前生成的目标对象的操作日志中,可以包含本次操作的版本编号、本次操作是否标注了删除标签等信息,通过这些信息的组合,便可以将操作日志转换为对应的对象的版本实例。在转换得到对象的版本实例后,可以将该对象的版本实例写入对象逻辑头中,从而完成了元数据的改动。
在另一个应用示例中,如果需要在多版本文件中删除目标对象,那么同样在对象逻辑头中生成对应的操作日志。后续,当从分布式对象存储系统中将目标对象删除后,可以根据生成的操作日志,从对象逻辑头中将目标对象的实例也一并删除,从而也能够完成元数据的改动。
由上可见,根据操作类型的不同,在对象逻辑头中执行的完成动作也不同。若操作日志表征在多版本文件中添加目标对象,执行的完成动作可以是根据操作日志生成目标对象的实例,并将目标对象的实例存放至对象逻辑头中。而如果操作日志表征在多版本文件中将目标对象删除,执行的完成动作可以是在对象逻辑头中将目标对象的实例删除。这样,便可以在目标对象完成操作之后,在对象逻辑头中对目标对象的实例执行与操作日志相匹配的完成动作。
在一个实施方式中,如果操作日志表征在多版本文件中将目标对象删除, 那么当在对象逻辑头中将目标对象的实例删除后,如果对象逻辑头中不存在其它实例,则说明书当前的多版本文件中的全部对象都已经被删除,此时,可以将该多版本文件的对象逻辑头也一并删除,从而使得元数据与实际的多版本文件的数据能够保持一致。
在实际应用中,针对同一个多版本文件,可能会同时存在多个并发操作。以两个并发操作为例,假设针对多版本文件并发操作第一目标对象和第二目标对象,并且第二目标对象在第一目标对象之后完成操作。在一个应用示例中,这两个并发操作均为添加目标对象的操作,那么这两个目标对象的并发添加过程可以如表4所示:
表4 并发添加两个目标对象的示意表
Figure PCTCN2020103447-appb-000003
通过上述的并发添加后,多版本文件中新增了对象VA和VB。
在另一个应用示例中,假设两个并发操作为添加第一目标对象,以及删除第二目标对象,那么这两个并发操作的过程可以如表5所示:
表5 添加和删除对象的并发操作示意表
Figure PCTCN2020103447-appb-000004
Figure PCTCN2020103447-appb-000005
由上可见,通过上述的两个并发操作,多版本文件中原有的对象VA和VB对象中,VA被删除,同时新增了对象VC,多版本文件中至少包含对象VB和VC,且这里及本文中其他段落中用于举例说明的对象VA、对象VB、对象VC、对象VE和对象VF均表示同一个多版本文件的不同版本。
在另一个应用示例中,假设两个并发操作均为删除操作,那么这两个并发操作的过程可以如表6所示:
表6 并发删除两个对象的操作示意表
Figure PCTCN2020103447-appb-000006
由上可见,在删除了目标对象之后,如果对象逻辑头中已经没有其它对象的版本实例,可以将该对象逻辑头也一并删除。在实际应用中,当第一目标对象和第二目标对象的操作类型中至少有一个为删除对象类型时,在对象逻辑头中删除对象的版本实例之后,若对象逻辑头中不存在其它实例,则可以将对象逻辑头一并删除。
S5:在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
在本实施方式中,在对象逻辑头中执行目标对象的实例的完成动作后,可 以更新多版本文件的版本信息。通常而言,版本信息中可以包括最新版本的编号,并且版本信息可以标注出最新版本指向的对象。其中,最新版本的编号可以按照多版本文件中对象的操作次数逐渐递增。例如,多版本文件原始的版本编号为1,那么在向多版本文件中依次添加对象VA和VB之后,最新版本的编号便可以是3。然后,再次从多版本文件中删除对象VB以及添加对象VC后,最新版本的编号便可以是5。可见,若针对多版本文件并发操作第一目标对象和第二目标对象,那么针对第一目标对象的操作和第二目标对象的操作,可以在原始的版本编号的基础上逐一递增版本编号,以生成最新版本的编号。最新版本指向的对象可以根据对象的操作类型来确定。具体地,可以根据第一目标对象的操作类型和第二目标对象的操作类型,在多版本文件中确定最新版本的对象,该最新版本的对象便可以是版本信息指向的对象。举例来说,若第一目标对象和第二目标对象的操作类型均为添加对象类型,由于第二目标对象是最后添加的,因此可以将第二目标对象确定为最新版本的对象。例如在表4中,最新版本的对象可以是VB。若第一目标对象和第二目标对象的操作类型中,一个为添加对象类型,另一个为删除对象类型,那么可以将添加对象类型对应的目标对象确定为最新版本的对象。例如在表5中,最新版本的对象可以是VC。若第一目标对象和第二目标对象的操作类型均为删除对象类型,那么可以在多版本文件的剩余对象中查询最新添加的对象,并将最新添加的对象确定为最新版本的对象。例如在表6中,如果在删除VB之后,多版本文件中还剩余VE和VF,而VF是在VE之后添加的,那么最新版本的对象便可以是VF。
在本实施方式中,在生成了最新版本的编号,以及确定了最新版本指向的对象后,便可以将这些信息记录于更新后的多版本文件的版本信息中,从而完成版本信息的更新过程。
此外,在完成目标对象的操作之后,可以更新对象逻辑头中的扩展属性。例如,在完成目标对象的操作之后,最新版本的编号为5,最新版本指向的对象为VC,并且最新版本指向的对象不具备删除标记,那么attr数据类型可以如表7所示:
表7 attr数据类型的示意表
属性名 属性值
user.olh.last_version 5
user.olh.target VC
user.olh.is_removed false
在一个实施方式中,考虑到分布式对象存储系统中通常是通过bucket(存储区域)来管理对象,那么在对分布式对象存储系统进行改进后,多版本文件的元数据可以存放于对应的对象逻辑头中,但同时该多版本文件的元数据也需要记录在bucket中。由于同样的元数据需要在两个不同的区域存储,因此可能会存在两份元数据不一致的问题。鉴于此,在本实施方式中,需要配置元数据的自动修复功能。
具体地,对象的上传或者删除的操作过程可以如表8所示:
表8 对象操作过程示意表
Figure PCTCN2020103447-appb-000007
由上可见,在对象逻辑头中生成目标对象的操作日志之后,可以将对象逻辑头中的该操作日志设置为待定状态。然后,在多版本文件的存储区域中生成目标对象的元数据操作日志后,也可以将该元数据操作日志设置为待定状态。当目标对象在分布式对象存储系统中完成操作之后,对象逻辑头中对应的操作日志被删除,并且bucket中的元数据操作日志的状态被设置为完成状态。
在实际应用中,表8中的一个或者多个步骤可能会失败。例如:
1)olh_prepare_op:成功
2)bucket_prepare_op:成功
3)上传对象:成功
4)olh_complete_op:失败
5)bucket_complete_op:失败
这样,分布式对象存储系统中对象已经上传成功了,但是对象逻辑头和bucket中的元数据却处理失败,此时需要对元数据进行修复。
在一个实施方式中,可以在bucket中检测目标对象的元数据操作日志,并 根据该元数据操作日志的当前状态,判断是否需要修复目标对象在存储区域和对象逻辑头中的元数据。具体地,若元数据操作日志的当前状态为待定状态,可以到系统中判断该目标对象是否已经在多版本文件中完成操作,若已经完成操作,则判定需要修复目标对象在bucket和对象逻辑头中的元数据。而若元数据操作日志的当前状态为完成状态,则表示元数据已经完成了处理,此时可以判定无需修复目标对象在bucket和对象逻辑头中的元数据。
举例来说,当olh_complete_op和bucket_complete_op失败后,bucket中存在对象的元数据操作日志,当bucket在处理该元数据操作日志时,可以到系统中查询该对象的存储状态。系统中表明该对象已经成功上传,那么bucket可以主动修复该对象在bucket和对象逻辑头中的元数据。具体地,在对象逻辑头中,可以根据对象逻辑头中的操作日志执行对应的完成动作,并删除操作日志。在bucket中,可以将元数据操作日志设置为完成状态,从而完成元数据的修复过程。
由上可见,本申请的实施方式中,还可以在元数据不一致时进行主动修复,从而提高了分布式对象存储系统的可用性和正确性。
请参阅图2,本申请还提供一种多版本文件的操作系统,所述系统包括:
对象逻辑头配置单元,用于为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头;
对象操作单元,用于针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作;
版本信息更新单元,用于在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
在一个实施方式中,所述对象操作单元包括:
对象添加模块,用于若所述操作日志表征在所述多版本文件中添加所述目标对象,根据所述操作日志生成所述目标对象的实例,并将所述目标对象的实例存放至所述对象逻辑头中;
对象删除模块,用于若所述操作日志表征在所述多版本文件中将所述目标对象删除,在所述对象逻辑头中将所述目标对象的实例删除。
在一个实施方式中,所述版本信息更新单元包括:
编号更新模块,用于若针对所述多版本文件并发操作第一目标对象和第二目标对象,并且所述第二目标对象在所述第一目标对象之后完成操作,针对所述第一目标对象的操作和所述第二目标对象的操作,在原始的版本编号的基础上逐一递增版本编号,以生成最新版本的编号;
信息记录模块,用于根据所述第一目标对象的操作类型和所述第二目标对象的操作类型,在所述多版本文件中确定最新版本的对象,并将生成的所述最新版本的编号和确定的所述最新版本的对象记录于更新后的所述多版本文件的版本信息中。
在一个实施方式中,所述系统还包括:
状态设置单元,用于将所述对象逻辑头中的所述操作日志设置为待定状态;以及在所述多版本文件的存储区域中生成所述目标对象的元数据操作日志,并将所述元数据操作日志设置为待定状态;
日志操作单元,用于当所述目标对象完成操作之后,所述对象逻辑头中的所述操作日志被删除,并且所述存储区域中的所述元数据操作日志的状态被设置为完成状态。
在一个实施方式中,所述系统还包括:
元数据修复单元,用于在所述存储区域中检测所述目标对象的元数据操作日志,并根据所述元数据操作日志的当前状态,判断是否需要修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据。
请参阅图3,本申请还提供一种多版本文件的操作装置,所述装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的多版本文件的操作方法。
由上可见,本申请一个或者多个实施方式提供的技术方案,针对不同的多版本文件,可以配置不同的对象逻辑头,该对象逻辑头可以记录对应的多版本文件的元数据。这样,不同的多版本文件需要进行文件操作时,只需要访问自身的对象逻辑头,而不需要对同一个bucket index发起多次访问。具体地,当针对多版本文件操作目标对象时,可以在对象逻辑头中生成对应的操作日志, 并且在该目标对象的操作完成后,可以在对象逻辑头中对目标对象的实例执行相匹配的完成动作。后续,在多版本文件当前的操作完成后,可以在对象逻辑头中更新多版本文件的版本信息,从而指向该多版本文件的最新版本对象。由上可见,不同的多版本文件可以通过自身的对象逻辑头来管理元数据,这样当发生目标对象的操作时,无需等待其它的多版本文件的操作流程,从而能够极大地提高多版本文件的操作效率。此外,bucket在处理元数据操作日志时,可以根据元数据操作日志的状态和系统中对象的实际操作结果,对bucket和对象逻辑头中的元数据进行主动修复,从而提高了分布式对象存储系统的可用性和正确性。
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对系统和装置的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。
本领域内的技术人员应明白,本发明的实施方式可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施方式、完全软件实施方式、或结合软件和硬件方面的实施方式的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施方式的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使 得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上所述仅为本申请的实施方式而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (19)

  1. 一种多版本文件的操作方法,其特征在于,所述方法包括:
    为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头;
    针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作;
    在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
  2. 根据权利要求1所述的方法,其特征在于,所述对象逻辑头中包含三类数据,其中,第一类数据用于存储对象的键值对,第二类数据用于存储对象的扩展属性,第三类数据用于存储对象的数据。
  3. 根据权利要求2所述的方法,其特征在于,所述第一类数据包含第一子数据类型和第二子数据类型,其中,所述第一子数据类型用于存储最新版本的编号并指向最新版本的对象,所述第二子数据类型用于存储操作日志和对象的版本实例。
  4. 根据权利要求2所述的方法,其特征在于,所述第二类数据用于存储对象的最新版本的编号、指向最新版本的对象以及标注最新版本的对象是否为删除实例。
  5. 根据权利要求1所述的方法,其特征在于,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作包括:
    若所述操作日志表征在所述多版本文件中添加所述目标对象,根据所述操作日志生成所述目标对象的实例,并将所述目标对象的实例存放至所述对象逻辑头中;
    若所述操作日志表征在所述多版本文件中将所述目标对象删除,在所述对 象逻辑头中将所述目标对象的实例删除。
  6. 根据权利要求1或5所述的方法,其特征在于,所述方法还包括:
    若所述操作日志表征在所述多版本文件中将所述目标对象删除,当在所述对象逻辑头中将所述目标对象的实例删除后,若所述对象逻辑头中不存在其它实例,将所述对象逻辑头删除。
  7. 根据权利要求1所述的方法,其特征在于,若针对所述多版本文件并发操作第一目标对象和第二目标对象,并且所述第二目标对象在所述第一目标对象之后完成操作,在所述对象逻辑头中更新所述多版本文件的版本信息包括:
    针对所述第一目标对象的操作和所述第二目标对象的操作,在原始的版本编号的基础上逐一递增版本编号,以生成最新版本的编号;
    根据所述第一目标对象的操作类型和所述第二目标对象的操作类型,在所述多版本文件中确定最新版本的对象,并将生成的所述最新版本的编号和确定的所述最新版本的对象记录于更新后的所述多版本文件的版本信息中。
  8. 根据权利要求7所述的方法,其特征在于,在所述多版本文件中确定最新版本的对象包括:
    若所述第一目标对象和所述第二目标对象的操作类型均为添加对象类型,将所述第二目标对象确定为最新版本的对象;
    若所述第一目标对象和所述第二目标对象的操作类型中,一个为添加对象类型,另一个为删除对象类型,将添加对象类型对应的目标对象确定为最新版本的对象;
    若所述第一目标对象和所述第二目标对象的操作类型均为删除对象类型,在所述多版本文件的剩余对象中查询最新添加的对象,并将所述最新添加的对象确定为最新版本的对象。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    当所述第一目标对象和所述第二目标对象的操作类型中至少有一个为删除对象类型时,在所述对象逻辑头中删除对象的版本实例之后,若所述对象逻辑 头中不存在其它实例,将所述对象逻辑头删除。
  10. 根据权利要求1所述的方法,其特征在于,在所述对象逻辑头中生成所述目标对象的操作日志之后,所述方法还包括:
    将所述对象逻辑头中的所述操作日志设置为待定状态;
    在所述多版本文件的存储区域中生成所述目标对象的元数据操作日志,并将所述元数据操作日志设置为待定状态;
    其中,当所述目标对象完成操作之后,所述对象逻辑头中的所述操作日志被删除,并且所述存储区域中的所述元数据操作日志的状态被设置为完成状态。
  11. 根据权利要求10所述的方法,其特征在于,在所述目标对象完成操作之后,所述方法还包括:
    在所述存储区域中检测所述目标对象的元数据操作日志,并根据所述元数据操作日志的当前状态,判断是否需要修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据。
  12. 根据权利要求11所述的方法,其特征在于,判断是否需要修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据包括:
    若所述元数据操作日志的当前状态为待定状态,判断所述目标对象是否已经在所述多版本文件中完成操作,若已经完成操作,判定需要修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据;
    若所述元数据操作日志的当前状态为完成状态,判定无需修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据。
  13. 根据权利要求11或12所述的方法,其特征在于,修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据包括:
    在所述存储区域中,将所述元数据操作日志设置为完成状态;
    在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作,并删除所述对象逻辑头中的所述操作日志。
  14. 一种多版本文件的操作系统,其特征在于,所述系统包括:
    对象逻辑头配置单元,用于为多版本文件配置对象逻辑头,所述对象逻辑头用于记录所述多版本文件的元数据;其中,不同的多版本文件具备不同的对象逻辑头;
    对象操作单元,用于针对所述多版本文件中的目标对象进行操作时,在所述对象逻辑头中生成所述目标对象的操作日志,并在所述目标对象完成操作之后,在所述对象逻辑头中对所述目标对象的实例执行与所述操作日志相匹配的完成动作;
    版本信息更新单元,用于在所述对象逻辑头中更新所述多版本文件的版本信息,其中,所述版本信息至少用于表征最新版本的编号以及指向最新版本的对象。
  15. 根据权利要求14所述的系统,其特征在于,所述对象操作单元包括:
    对象添加模块,用于若所述操作日志表征在所述多版本文件中添加所述目标对象,根据所述操作日志生成所述目标对象的实例,并将所述目标对象的实例存放至所述对象逻辑头中;
    对象删除模块,用于若所述操作日志表征在所述多版本文件中将所述目标对象删除,在所述对象逻辑头中将所述目标对象的实例删除。
  16. 根据权利要求14所述的系统,其特征在于,所述版本信息更新单元包括:
    编号更新模块,用于若针对所述多版本文件并发操作第一目标对象和第二目标对象,并且所述第二目标对象在所述第一目标对象之后完成操作,针对所述第一目标对象的操作和所述第二目标对象的操作,在原始的版本编号的基础上逐一递增版本编号,以生成最新版本的编号;
    信息记录模块,用于根据所述第一目标对象的操作类型和所述第二目标对象的操作类型,在所述多版本文件中确定最新版本的对象,并将生成的所述最新版本的编号和确定的所述最新版本的对象记录于更新后的所述多版本文件的版本信息中。
  17. 根据权利要求14所述的系统,其特征在于,所述系统还包括:
    状态设置单元,用于将所述对象逻辑头中的所述操作日志设置为待定状态;以及在所述多版本文件的存储区域中生成所述目标对象的元数据操作日志,并将所述元数据操作日志设置为待定状态;
    日志操作单元,用于当所述目标对象完成操作之后,所述对象逻辑头中的所述操作日志被删除,并且所述存储区域中的所述元数据操作日志的状态被设置为完成状态。
  18. 根据权利要求17所述的系统,其特征在于,所述系统还包括:
    元数据修复单元,用于在所述存储区域中检测所述目标对象的元数据操作日志,并根据所述元数据操作日志的当前状态,判断是否需要修复所述目标对象在所述存储区域和所述对象逻辑头中的元数据。
  19. 一种多版本文件的操作装置,其特征在于,所述装置包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至13中任一项所述的方法。
PCT/CN2020/103447 2020-06-11 2020-07-22 一种多版本文件的操作方法、系统及装置 WO2021248640A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010528171.7A CN111752909B (zh) 2020-06-11 2020-06-11 一种多版本文件的操作方法、系统及装置
CN202010528171.7 2020-06-11

Publications (1)

Publication Number Publication Date
WO2021248640A1 true WO2021248640A1 (zh) 2021-12-16

Family

ID=72675931

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103447 WO2021248640A1 (zh) 2020-06-11 2020-07-22 一种多版本文件的操作方法、系统及装置

Country Status (2)

Country Link
CN (1) CN111752909B (zh)
WO (1) WO2021248640A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286880A (zh) * 2020-10-23 2021-01-29 北京金山云网络技术有限公司 数据存储方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011177A1 (en) * 2002-10-22 2012-01-12 Microsoft Corporation Transaction-safe fat file system improvements
US20160147811A1 (en) * 2014-11-25 2016-05-26 Amarnadh Sai Eluri Database Lockless Index for Accessing Multi-Version Concurrency Control Data
CN109271194A (zh) * 2018-08-22 2019-01-25 五八有限公司 基于分布式版本控制系统的分支访问方法和装置
CN110019134A (zh) * 2017-12-27 2019-07-16 阿里巴巴集团控股有限公司 数据库的多版本控制方法及设备
CN111090620A (zh) * 2019-12-06 2020-05-01 浪潮电子信息产业股份有限公司 一种文件存储方法、装置、设备及可读存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5649200A (en) * 1993-01-08 1997-07-15 Atria Software, Inc. Dynamic rule-based version control system
JP4141556B2 (ja) * 1998-12-18 2008-08-27 株式会社日立製作所 構造化文書管理方法及びその実施装置並びにその処理プログラムを記録した媒体
US20070005874A1 (en) * 2005-07-01 2007-01-04 Dan Dodge File system storing transaction records in flash-like media
CN106708734B (zh) * 2016-12-13 2020-01-10 腾讯科技(深圳)有限公司 软件异常检测方法及装置
US20180351806A1 (en) * 2017-05-31 2018-12-06 Cisco Technology, Inc. Intent specification checks for inconsistencies

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011177A1 (en) * 2002-10-22 2012-01-12 Microsoft Corporation Transaction-safe fat file system improvements
US20160147811A1 (en) * 2014-11-25 2016-05-26 Amarnadh Sai Eluri Database Lockless Index for Accessing Multi-Version Concurrency Control Data
CN110019134A (zh) * 2017-12-27 2019-07-16 阿里巴巴集团控股有限公司 数据库的多版本控制方法及设备
CN109271194A (zh) * 2018-08-22 2019-01-25 五八有限公司 基于分布式版本控制系统的分支访问方法和装置
CN111090620A (zh) * 2019-12-06 2020-05-01 浪潮电子信息产业股份有限公司 一种文件存储方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN111752909A (zh) 2020-10-09
CN111752909B (zh) 2023-05-16

Similar Documents

Publication Publication Date Title
WO2021017421A1 (zh) 区块链状态数据恢复方法及装置、电子设备
CN108389118B (zh) 资产管理系统、方法及装置、电子设备
WO2021017435A1 (zh) 区块链状态数据存储方法及装置、电子设备
US10891264B2 (en) Distributed, scalable key-value store
US20180349340A1 (en) Method for building a spreadsheet template with dynamic data transfer capabilities to a remote application
CN108304463A (zh) 一种用于数据库的数据管理方法及其数据库应用组件
US8825653B1 (en) Characterizing and modeling virtual synthetic backup workloads
WO2020093501A1 (zh) 文件存储方法、删除方法、服务器及存储介质
WO2021057482A1 (zh) 一种区块链中布隆过滤器的生成方法及装置
CN107016016A (zh) 一种数据处理的方法及装置
WO2016082559A1 (zh) 一种数据写入方法及存储设备
US20190294664A1 (en) Dynamically transferring data from a spreadsheet to a remote application
WO2014117337A1 (zh) 数据更新方法及装置和产品
WO2021248640A1 (zh) 一种多版本文件的操作方法、系统及装置
CN110597821B (zh) 数据仓库表结构变更方法及装置
WO2016188280A1 (zh) 数据库分表的写入方法及装置
US10275480B1 (en) Immediately-consistent lock-free indexing for distributed applications
US11715030B2 (en) Automatic object optimization to accelerate machine learning training
WO2017084520A1 (zh) 一种云环境下数据文件同步的方法和装置
JP6450865B2 (ja) 多数の重複するソースからの大量の時間データの集計
US20170235781A1 (en) Method, server and computer program stored in computer readable medium for managing log data in database
US20170344627A1 (en) System for lightweight objects
WO2024000897A1 (zh) 一种基于区块链的数字资产合成方法及装置
US9009731B2 (en) Conversion of lightweight object to a heavyweight object
CN107092671B (zh) 一种元信息管理的方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20939910

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20939910

Country of ref document: EP

Kind code of ref document: A1