CN111880741A - Object state setting method and device, electronic equipment and storage medium - Google Patents
Object state setting method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111880741A CN111880741A CN202010745279.1A CN202010745279A CN111880741A CN 111880741 A CN111880741 A CN 111880741A CN 202010745279 A CN202010745279 A CN 202010745279A CN 111880741 A CN111880741 A CN 111880741A
- Authority
- CN
- China
- Prior art keywords
- target
- objects
- setting
- groups
- writing
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000003860 storage Methods 0.000 title claims abstract description 13
- 238000004590 computer program Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 15
- 230000000694 effects Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0632—Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请公开了一种对象状态设置方法、装置及一种电子设备和计算机可读存储介质,该方法包括:将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。本申请提供的对象状态设置方法,在精简卷写入流程中,增加对象状态的批量设置过程,实现一次写入、批量对象状态置位的效果,这样在对已置位对象进行写入时,不必对该对象的对象状态进行设置,从IO流程中减少每次都设置对象状态的操作耗时,从整体上提升写入性能。
The present application discloses an object state setting method and apparatus, an electronic device and a computer-readable storage medium. The method includes: dividing all objects in a target volume into multiple object groups; wherein each of the object groups includes a plurality of the objects; when receiving a request for writing target data into a target object in the target volume, determine the target object group to which the target object belongs; set the object status of all objects in the target object group in batches, and Write the target data into the target object. In the object state setting method provided by the present application, in the simplified volume writing process, a batch setting process of the object state is added, so as to realize the effect of one-time writing and batch object state setting, so that when writing the set object, It is not necessary to set the object state of the object, reducing the time-consuming operation of setting the object state every time from the IO process, and improving the writing performance as a whole.
Description
技术领域technical field
本申请涉及计算机技术领域,更具体地说,涉及一种对象状态设置方法、装置及一种电子设备和一种计算机可读存储介质。The present application relates to the field of computer technology, and more particularly, to a method and apparatus for setting an object state, an electronic device, and a computer-readable storage medium.
背景技术Background technique
在当前分布式存储系统中,块应用已经广泛应用于各种工业生产场景中。卷作为块应用的基本功能单位,承担了主要的功能实现和业务输出,根据目前的应用场景划分,卷主要分为精简卷和厚置备卷两种,前者可实现卷的快速创建,并弹性化使用设备存储空间,提升了存储使用效率,是目前市场主要的应用方式。但是在精简卷实现时,将对象状态区分为已存在、不存在等场景,并引入object-map方式记录精简卷的对象状态信息,在初次写入精简卷对象时,除了创建对象、写入数据等必要操作外,还需要同步更新object-map中的对象状态,将对象状态置为已存在,在写入时会造成精简卷写入性能爬升过程拉长,尤其是在顺序写入场景,影响更加明显。In current distributed storage systems, block applications have been widely used in various industrial production scenarios. As the basic functional unit of block applications, volumes are responsible for the main function implementation and business output. According to the current application scenarios, volumes are mainly divided into two types: thin volumes and thick provisioned volumes. The former can realize the rapid creation of volumes and make them flexible Using device storage space improves storage efficiency and is currently the main application method in the market. However, when implementing a thin volume, the object status is divided into existing and non-existing scenarios, and the object-map method is introduced to record the object status information of the thin volume. When writing a thin volume object for the first time, in addition to creating objects and writing data In addition to other necessary operations, it is also necessary to update the object state in the object-map synchronously, and set the object state as existing, which will cause the thin volume write performance to increase during writing, especially in the sequential write scenario, which affects more obvious.
因此,如何提升精简卷的写入性能是本领域技术人员需要解决的技术问题。Therefore, how to improve the write performance of the thin volume is a technical problem to be solved by those skilled in the art.
发明内容SUMMARY OF THE INVENTION
本申请的目的在于提供一种对象状态设置方法、装置及一种电子设备和一种计算机可读存储介质,提升了精简卷的写入性能。The purpose of the present application is to provide an object state setting method and apparatus, an electronic device, and a computer-readable storage medium, so as to improve the write performance of a thin volume.
为实现上述目的,本申请提供了一种对象状态设置方法,包括:To achieve the above purpose, the present application provides an object state setting method, including:
将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;dividing all objects in the target volume into a plurality of object groups; wherein each of the object groups includes a plurality of the objects;
当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;When receiving a request for writing target data into a target object in the target volume, determining a target object group to which the target object belongs;
批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。The object states of all objects in the target object group are set in batches, and the target data is written into the target objects.
其中,将目标卷中所有对象划分为多个对象组,包括:Among them, all objects in the target volume are divided into multiple object groups, including:
将目标卷中所有对象按照标识顺序划分为多个对象组;其中,每个所述对象组中所有对象的标识连续。All objects in the target volume are divided into multiple object groups according to the identification sequence; wherein, the identifications of all objects in each of the object groups are consecutive.
其中,除最后一个对象组之外的对象组包括对象的数目相同。Among them, the object groups other than the last object group include the same number of objects.
其中,所述将目标卷中所有对象划分为多个对象组,包括:Wherein, all objects in the target volume are divided into multiple object groups, including:
获取批量设置对象状态的对象数目;Get the number of objects that set the object state in batches;
将目标卷中所有对象划分为多个对象组;其中,除最后一个对象组之外的对象组包括所述对象数目个所述对象。All objects in the target volume are divided into a plurality of object groups; wherein, the object groups except the last object group include the number of the objects.
其中,所述获取批量设置对象状态的对象数目,包括:Wherein, the obtaining the number of objects for batch setting object status includes:
在所述目标卷所属集群的配置文件中添加目标配置项;其中,所述目标配置项用于描述批量设置对象状态的对象数目;Add a target configuration item to the configuration file of the cluster to which the target volume belongs; wherein, the target configuration item is used to describe the number of objects for batch setting object status;
通过输入接口获取所述目标配置项的值,以便获取批量设置对象状态的对象数目。Obtain the value of the target configuration item through the input interface, so as to obtain the number of objects for batch setting of the object state.
其中,所述设置所述目标对象组中所有对象的对象状态,包括:Wherein, the setting of the object states of all objects in the target object group includes:
将所述目标对象组中所有对象的对象状态设置为已存在状态。Set the object state of all objects in the target object group to the existing state.
其中,所述批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中,包括:Wherein, the batch setting of the object states of all objects in the target object group, and writing the target data into the target objects, includes:
判断所述目标对象组中所有对象的对象状态是否为已存在状态;Determine whether the object state of all objects in the target object group is an existing state;
若是,则将所述目标数据写入所述目标对象中;If so, write the target data into the target object;
若否,则设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。If not, set the object states of all objects in the target object group, and write the target data into the target object.
为实现上述目的,本申请提供了一种对象状态设置装置,包括:To achieve the above purpose, the present application provides an object state setting device, including:
划分模块,用于将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;a dividing module, configured to divide all objects in the target volume into a plurality of object groups; wherein each of the object groups includes a plurality of the objects;
确定模块,用于当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;a determining module, configured to determine a target object group to which the target object belongs when receiving a request for writing target data into a target object in the target volume;
设置模块,用于批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。A setting module is configured to set the object states of all objects in the target object group in batches, and write the target data into the target objects.
为实现上述目的,本申请提供了一种电子设备,包括:To achieve the above purpose, the present application provides an electronic device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如上述对象状态设置方法的步骤。The processor is configured to implement the steps of the above-mentioned object state setting method when executing the computer program.
为实现上述目的,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述对象状态设置方法的步骤。To achieve the above object, the present application provides a computer-readable storage medium, where a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned object state setting method are implemented.
通过以上方案可知,本申请提供的一种对象状态设置方法,包括:将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。It can be seen from the above solutions that an object state setting method provided by the present application includes: dividing all objects in a target volume into multiple object groups; wherein each of the object groups includes a plurality of the objects; When data is written into the target object in the target volume, determine the target object group to which the target object belongs; set the object status of all objects in the target object group in batches, and write the target data into the target in the object.
本申请提供的对象状态设置方法,在精简卷写入流程中,增加对象状态的批量设置过程,实现一次写入、批量对象状态置位的效果,这样在对已置位对象进行写入时,不必对该对象的对象状态进行设置,从IO流程中减少每次都设置对象状态的操作耗时,从整体上提升写入性能。本申请还公开了一种对象状态设置装置及一种电子设备和一种计算机可读存储介质,同样能实现上述技术效果。In the object state setting method provided by the present application, in the simplified volume writing process, a batch setting process of the object state is added, so as to realize the effect of one-time writing and batch object state setting, so that when writing the set object, It is not necessary to set the object state of the object, reducing the time-consuming operation of setting the object state every time from the IO process, and improving the writing performance as a whole. The present application also discloses an object state setting device, an electronic device, and a computer-readable storage medium, which can also achieve the above technical effects.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It is to be understood that the foregoing general description and the following detailed description are exemplary only and do not limit the application.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort. The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification, and together with the following detailed description, are used to explain the present disclosure, but not to limit the present disclosure. In the attached image:
图1为根据一示例性实施例示出的一种对象状态设置方法的流程图;FIG. 1 is a flowchart of a method for setting an object state according to an exemplary embodiment;
图2为根据一示例性实施例示出的另一种对象状态设置方法的流程图;FIG. 2 is a flowchart of another object state setting method according to an exemplary embodiment;
图3为根据一示例性实施例示出的一种对象状态设置装置的结构图;FIG. 3 is a structural diagram of an object state setting device according to an exemplary embodiment;
图4为根据一示例性实施例示出的一种电子设备的结构图。FIG. 4 is a structural diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请实施例公开了一种对象状态设置方法,提升了精简卷的写入性能。The embodiment of the present application discloses a method for setting an object state, which improves the write performance of a thin volume.
参见图1,根据一示例性实施例示出的一种对象状态设置方法的流程图,如图1所示,包括:Referring to FIG. 1 , a flowchart of a method for setting an object state according to an exemplary embodiment, as shown in FIG. 1 , includes:
S101:将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;S101: Divide all objects in the target volume into multiple object groups; wherein each of the object groups includes a plurality of the objects;
本实施例中的目标卷为精简卷,本步骤的目的在于将目标卷的所有对象划分为多个对象组,同一对象组中的所有对象在同一时刻设置对象状态。作为一种可行的实施方式,将目标卷中所有对象按照标识顺序划分为多个对象组;其中,每个对象组中所有对象的标识连续。优选的,除最后一个对象组之外的对象组包括对象的数目相同。The target volume in this embodiment is a reduced volume, and the purpose of this step is to divide all objects of the target volume into multiple object groups, and all objects in the same object group set the object state at the same time. As a feasible implementation manner, all objects in the target volume are divided into multiple object groups according to the identification sequence; wherein, the identifications of all objects in each object group are consecutive. Preferably, the object groups other than the last object group include the same number of objects.
作为一种优选实施方式,本步骤可以包括:获取批量设置对象状态的对象数目;将目标卷中所有对象划分为多个对象组;其中,除最后一个对象组之外的对象组包括所述对象数目个所述对象。在具体实施中,在集群配置文件中增加配置项,用于配置单次写入批量置位的对象数目。即所述获取批量设置对象状态的对象数目的步骤可以包括:在所述目标卷所属集群的配置文件中添加目标配置项;其中,所述目标配置项用于描述批量设置对象状态的对象数目;通过输入接口获取所述目标配置项的值,以便获取批量设置对象状态的对象数目。目标配置项默认为256,即将卷中所有对象,从对象标识为1的对象开始按顺序分组,组号从1开始依次递增,每组256个对象,不足256的单独一组,当然用户可以通过输入接口对目标配置项的值进行修改。As a preferred embodiment, this step may include: acquiring the number of objects for batch setting of object states; dividing all objects in the target volume into multiple object groups; wherein, the object groups except the last object group include the objects number of said objects. In a specific implementation, a configuration item is added to the cluster configuration file to configure the number of objects to be set in batches in a single write. That is, the step of obtaining the number of objects for batch setting object status may include: adding a target configuration item to the configuration file of the cluster to which the target volume belongs; wherein, the target configuration item is used to describe the number of objects for batch setting object status; Obtain the value of the target configuration item through the input interface, so as to obtain the number of objects for batch setting of the object state. The default target configuration item is 256, that is, all objects in the volume are grouped in order starting from the object with the object ID of 1, and the group number increases from 1. Each group has 256 objects. The input interface modifies the value of the target configuration item.
S102:当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;S102: when receiving a request for writing target data into a target object in the target volume, determine a target object group to which the target object belongs;
S103:批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。S103: Set the object states of all objects in the target object group in batches, and write the target data into the target objects.
在具体实施中,当目标数据需要写入目标卷中的目标对象时,批量设置该目标对象所属的目标对象组中所有对象的对象状态,即将所述目标对象组中所有对象的对象状态设置为已存在状态。以写入对象5为例,该对象位于组1中,将对象1至对象256对应的对象状态标识位全部更新为已存在状态,并将写入数据落盘存储。当对组1中其它对象有写入动作时,读取该对象的对象状态为已存在状态时,直接进行数据落盘,不需要再设置该对象的对象状态标识位。In a specific implementation, when target data needs to be written to a target object in a target volume, the object status of all objects in the target object group to which the target object belongs is set in batches, that is, the object status of all objects in the target object group is set to State already exists. Taking the write object 5 as an example, the object is located in the group 1, all the object status flags corresponding to the object 1 to the object 256 are updated to the existing state, and the written data is stored on the disk. When there is a write action to other objects in group 1, when the object state of the object is read as the existing state, the data is directly placed on the disk, and there is no need to set the object state flag of the object.
本申请实施例提供的对象状态设置方法,在精简卷写入流程中,增加对象状态的批量设置过程,实现一次写入、批量对象状态置位的效果,这样在对已置位对象进行写入时,不必对该对象的对象状态进行设置,从IO流程中减少每次都设置对象状态的操作耗时,从整体上提升写入性能。The object state setting method provided by the embodiment of the present application adds a batch setting process of the object state in the simplified volume writing process, so as to realize the effect of one-time write and batch object state setting, so that the set object is written to the set object. When , it is not necessary to set the object state of the object, reducing the time-consuming operation of setting the object state every time from the IO process, and improving the writing performance as a whole.
本申请实施例公开了一种对象状态设置方法,相对于上一实施例,本实施例对技术方案作了进一步的说明和优化。具体的:The embodiment of the present application discloses a method for setting an object state. Compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. specific:
参见图2,根据一示例性实施例示出的另一种对象状态设置方法的流程图,如图2所示,包括:Referring to FIG. 2 , a flowchart of another object state setting method according to an exemplary embodiment, as shown in FIG. 2 , includes:
S201:将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;S201: Divide all objects in the target volume into a plurality of object groups; wherein each of the object groups includes a plurality of the objects;
S202:当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;S202: when receiving a request for writing target data into a target object in the target volume, determine a target object group to which the target object belongs;
S203:判断所述目标对象组中所有对象的对象状态是否为已存在状态;若是,则直接进入S205;若否,则进入S204;S203: Determine whether the object states of all objects in the target object group are existing states; if so, go directly to S205; if not, go to S204;
S204:设置所述目标对象组中所有对象的对象状态;并进入S205;S204: set the object states of all objects in the target object group; and enter S205;
S205:将所述目标数据写入所述目标对象中。S205: Write the target data into the target object.
在本实施例中,当目标数据需要写入目标卷中的目标对象时,确定其所属的目标对象组,若该目标对象组内所有对象的对象状态批量设置完成,即均为已存在状态,则直接将目标数据写入目标对象中,否则,批量设置目标对象组内所有对象的对象状态,并将目标数据写入目标对象中。In this embodiment, when the target data needs to be written to the target object in the target volume, the target object group to which it belongs is determined. Then directly write the target data into the target object, otherwise, set the object status of all objects in the target object group in batches, and write the target data into the target object.
由此可见,本实施例采用批量更新对象状态的方式,摒弃原有的写入一个、更新一个的处理方式,减少相关对象首次写入时由于对象状态更新产生的时延,从而提高卷写入速率。经验证,此种处理方式针对卷顺序写入改善效果尤为明显。It can be seen that this embodiment adopts the method of updating object states in batches, abandons the original processing method of writing one and updating one, and reduces the delay caused by the object state update when the related objects are written for the first time, thereby improving the volume writing. rate. It has been verified that this processing method is particularly effective for volume sequential writing.
下面对本申请实施例提供的一种对象状态设置装置进行介绍,下文描述的一种对象状态设置装置与上文描述的一种对象状态设置方法可以相互参照。The following describes an object state setting apparatus provided by an embodiment of the present application. An object state setting apparatus described below and an object state setting method described above may be referred to each other.
参见图3,根据一示例性实施例示出的一种对象状态设置装置的结构图,如图3所示,包括:Referring to FIG. 3 , a structural diagram of an object state setting device according to an exemplary embodiment, as shown in FIG. 3 , includes:
划分模块301,用于将目标卷中所有对象划分为多个对象组;其中,每个所述对象组包括多个所述对象;A
确定模块302,用于当接收到目标数据写入所述目标卷中目标对象的请求时,确定所述目标对象所属的目标对象组;a determining
设置模块303,用于批量设置所述目标对象组中所有对象的对象状态,并将所述目标数据写入所述目标对象中。The
本申请实施例提供的对象状态设置装置,在精简卷写入流程中,增加对象状态的批量设置过程,实现一次写入、批量对象状态置位的效果,这样在对已置位对象进行写入时,不必对该对象的对象状态进行设置,从IO流程中减少每次都设置对象状态的操作耗时,从整体上提升写入性能。The object state setting device provided by the embodiment of the present application adds a batch setting process for the object state in the simplified volume writing process, so as to realize the effect of one-time write and batch object state setting, so that the set object is written to the set object. When , it is not necessary to set the object state of the object, reducing the time-consuming operation of setting the object state every time from the IO process, and improving the writing performance as a whole.
在上述实施例的基础上,作为一种优选实施方式,所述划分模块301具体为将目标卷中所有对象按照标识顺序划分为多个对象组的模块;其中,每个所述对象组中所有对象的标识连续。On the basis of the above embodiment, as a preferred implementation, the
在上述实施例的基础上,作为一种优选实施方式,除最后一个对象组之外的对象组包括对象的数目相同。On the basis of the above-mentioned embodiment, as a preferred implementation, the object groups except the last object group include the same number of objects.
在上述实施例的基础上,作为一种优选实施方式,所述划分模块301包括:On the basis of the above embodiment, as a preferred implementation manner, the
获取单元,用于获取批量设置对象状态的对象数目;Obtaining unit, used to obtain the number of objects for batch setting object status;
划分单元,用于将目标卷中所有对象划分为多个对象组;其中,除最后一个对象组之外的对象组包括所述对象数目个所述对象。a dividing unit, configured to divide all objects in the target volume into a plurality of object groups; wherein, the object groups except the last object group include the number of the objects.
在上述实施例的基础上,作为一种优选实施方式,所述获取单元包括:On the basis of the above embodiment, as a preferred implementation manner, the acquisition unit includes:
添加子单元,用于在所述目标卷所属集群的配置文件中添加目标配置项;其中,所述目标配置项用于描述批量设置对象状态的对象数目;The adding subunit is used to add a target configuration item in the configuration file of the cluster to which the target volume belongs; wherein, the target configuration item is used to describe the number of objects for batch setting object status;
获取子单元,用于通过输入接口获取所述目标配置项的值,以便获取批量设置对象状态的对象数目。The obtaining subunit is used to obtain the value of the target configuration item through the input interface, so as to obtain the number of objects for batch setting the state of the object.
在上述实施例的基础上,作为一种优选实施方式,所述设置模块303具体为将所述目标对象组中所有对象的对象状态设置为已存在状态,并将所述目标数据写入所述目标对象中的模块。On the basis of the above embodiment, as a preferred implementation, the
在上述实施例的基础上,作为一种优选实施方式,所述设置模块303包括:On the basis of the above embodiment, as a preferred implementation manner, the
判断单元,用于判断所述目标对象组中所有对象的对象状态是否为已存在状态;若是,则启动写入单元的工作流程;若否,则启动设置单元的工作流程;A judging unit for judging whether the object state of all objects in the target object group is an existing state; if so, start the work flow of the writing unit; if not, start the work flow of the setting unit;
设置单元,用于设置所述目标对象组中所有对象的对象状态,并启动设置单元的工作流程;a setting unit for setting the object states of all objects in the target object group, and starting the workflow of the setting unit;
写入单元,用于将所述目标数据写入所述目标对象中。a writing unit, configured to write the target data into the target object.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本申请还提供了一种电子设备,参见图4,本申请实施例提供的一种电子设备400的结构图,如图4所示,可以包括处理器11和存储器12。该电子设备400还可以包括多媒体组件13,输入/输出(I/O)接口14,以及通信组件15中的一者或多者。The present application further provides an electronic device. Referring to FIG. 4 , a structural diagram of an
其中,处理器11用于控制该电子设备400的整体操作,以完成上述的对象状态设置方法中的全部或部分步骤。存储器12用于存储各种类型的数据以支持在该电子设备400的操作,这些数据例如可以包括用于在该电子设备400上操作的任何应用程序或方法的指令,以及应用程序相关的数据。该存储器12可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件13可以包括屏幕,例如可以是触摸屏。I/O接口14为处理器11和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件15用于该电子设备400与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件15可以包括:Wi-Fi模块,蓝牙模块,NFC模块。Wherein, the
在一示例性实施例中,电子设备400可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(DigitalSignal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的对象状态设置方法。In an exemplary embodiment, the
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述对象状态设置方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器12,上述程序指令可由电子设备400的处理器11执行以完成上述的对象状态设置方法。In another exemplary embodiment, there is also provided a computer-readable storage medium including program instructions, the program instructions implementing the steps of the above-mentioned object state setting method when executed by a processor. For example, the computer-readable storage medium can be the above-mentioned
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can also be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is no such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010745279.1A CN111880741B (en) | 2020-07-29 | 2020-07-29 | Object state setting method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010745279.1A CN111880741B (en) | 2020-07-29 | 2020-07-29 | Object state setting method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111880741A true CN111880741A (en) | 2020-11-03 |
CN111880741B CN111880741B (en) | 2022-11-25 |
Family
ID=73201068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010745279.1A Active CN111880741B (en) | 2020-07-29 | 2020-07-29 | Object state setting method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111880741B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059021A (en) * | 2019-04-18 | 2019-07-26 | 深圳市时创意电子有限公司 | A kind of algorithm for reducing write-in magnifying power and promoting random writing performance |
CN110673790A (en) * | 2019-09-06 | 2020-01-10 | 苏州浪潮智能科技有限公司 | Hard disk control method and device, electronic equipment and storage medium |
CN111061435A (en) * | 2019-12-29 | 2020-04-24 | 浪潮电子信息产业股份有限公司 | A method, device, electronic device, and storage medium for creating a thick provisioned volume |
-
2020
- 2020-07-29 CN CN202010745279.1A patent/CN111880741B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059021A (en) * | 2019-04-18 | 2019-07-26 | 深圳市时创意电子有限公司 | A kind of algorithm for reducing write-in magnifying power and promoting random writing performance |
CN110673790A (en) * | 2019-09-06 | 2020-01-10 | 苏州浪潮智能科技有限公司 | Hard disk control method and device, electronic equipment and storage medium |
CN111061435A (en) * | 2019-12-29 | 2020-04-24 | 浪潮电子信息产业股份有限公司 | A method, device, electronic device, and storage medium for creating a thick provisioned volume |
Also Published As
Publication number | Publication date |
---|---|
CN111880741B (en) | 2022-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11003438B2 (en) | Method and device for incremental upgrade | |
KR102125177B1 (en) | Blockchain-based data processing method and device | |
CN110515871B (en) | Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium | |
US11237761B2 (en) | Management of multiple physical function nonvolatile memory devices | |
WO2020221229A1 (en) | Application program sharing method and apparatus, shared information display method and apparatus, device and medium | |
CN110968585B (en) | Storage method, device, equipment and computer readable storage medium for alignment | |
CN108984225A (en) | The method and apparatus of quick start boarding application | |
CN110019024B (en) | Directory query method, system, electronic device and storage medium | |
CN112925783B (en) | Business data processing method and device, electronic device and storage medium | |
CN108776587B (en) | Data acquisition method and device, computer equipment and storage medium | |
CN111158597A (en) | Metadata reading method, device, electronic device and storage medium | |
WO2022199284A1 (en) | Call stack backtrace method and apparatus, and device and medium | |
CN110096413A (en) | A kind of disk localization method, system and electronic equipment and storage medium | |
CN112558872A (en) | Data processing method and device, storage medium and electronic equipment | |
CN109669672B (en) | Neutral version construction and page response method, system and related device | |
CN109101191B (en) | Data storage method, data storage device, storage medium and electronic equipment | |
CN111159160A (en) | A version rollback method, device, electronic device and storage medium | |
CN113342781B (en) | Data migration method, device, equipment and storage medium | |
CN110688070B (en) | Management method and device for solid state disk data table, storage medium and electronic equipment | |
CN111880741B (en) | Object state setting method, device, electronic equipment and storage medium | |
CN110998524A (en) | Method for processing configuration file, processing unit, touch chip, device and medium | |
CN117041980A (en) | Network element management method and device, storage medium and electronic equipment | |
CN116166342A (en) | Service processing method, device, equipment and storage medium | |
WO2022199331A1 (en) | Method and apparatus for obtaining information of stack frame in call stack, device, and medium | |
CN114253870A (en) | A method, system, device and medium for updating L2P table |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |