CN111399754A - Storage space release method and device and distributed system - Google Patents

Storage space release method and device and distributed system Download PDF

Info

Publication number
CN111399754A
CN111399754A CN201910826429.9A CN201910826429A CN111399754A CN 111399754 A CN111399754 A CN 111399754A CN 201910826429 A CN201910826429 A CN 201910826429A CN 111399754 A CN111399754 A CN 111399754A
Authority
CN
China
Prior art keywords
time point
reference time
target reference
storage
server
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
Application number
CN201910826429.9A
Other languages
Chinese (zh)
Other versions
CN111399754B (en
Inventor
包国强
潘习文
林起芊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology Co Ltd
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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201910826429.9A priority Critical patent/CN111399754B/en
Publication of CN111399754A publication Critical patent/CN111399754A/en
Application granted granted Critical
Publication of CN111399754B publication Critical patent/CN111399754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The embodiment of the invention provides a method and a device for releasing a storage space and a distributed system. Wherein, a distributed system includes: the management server is used for selecting a target reference time point as a deleting basis from the recorded multiple reference time points when the distributed system is detected to meet the preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point; sending a target reference time point and an auxiliary time point to each storage server in the distributed system; a storage server for receiving a target reference time point and an auxiliary time point; correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point; and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects. The scheme can improve the releasing accuracy of the storage space.

Description

Storage space release method and device and distributed system
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method and an apparatus for releasing a storage space, and a distributed system.
Background
In order to facilitate storage and management of mass data, more and more distributed systems perform object storage on data, so as to achieve the effect of giving consideration to both centralized management of resources and distributed sharing. When storing objects, a complete data from a user perspective, for example, a folder or a video, is uploaded to the storage system, and then the managed server acts as an Object and divides the Object into a plurality of sub-objects, and the sub-objects obtained by division are allocated to the respective storage servers for storage. Since the distribution positions of the storage servers of the distributed system are different and the system times of different storage servers may be different, in order to ensure that the management server can notify the storage services with uniform storage time in the space release process, an auxiliary clock capable of unifying the system times of the storage servers is usually set. The method specifically comprises the following steps: the management server determines a uniform time point according to the system time of all the storage servers, the uniform time point is used as an initial time point of the auxiliary clock, and the time point of the auxiliary clock continuously increases according to a preset clock increasing rule. And each time the object storage is completed, the management server records the current time point of the auxiliary clock as the reference time point of the stored object, wherein the reference time point is the unified storage time point of each sub-object of the stored object stored in the storage server.
Based on the auxiliary clock, in the related art, when the storage space is released, the management server issues a target reference time point serving as a basis for deletion to each storage server. Correspondingly, each storage server takes the received target reference time point as a retrieval basis, retrieves the locally stored sub-object, and deletes the retrieved sub-object.
However, because the difference between the system time of some storage servers and the system time of other storage servers in the distributed system is large, the difference between the reference time point recorded by the management server and the local storage time point corresponding to the some servers may be large, and when the space is released by the some servers using the target reference time point, the stored child objects may be deleted by mistake.
Therefore, how to reduce the erroneous deletion of the stored child objects and improve the release accuracy of the storage space is an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a distributed system for releasing a storage space, so as to reduce erroneous deletion of a unit of a stored object and improve the accuracy of releasing the storage space. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a distributed system, where the system includes:
the management server is used for selecting a target reference time point as a deleting basis from the recorded multiple reference time points when the distributed system is detected to meet the preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point; transmitting the target reference time point and the auxiliary time point to each storage server in the distributed system;
the storage server is used for receiving the target reference time point and the auxiliary time point; correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point; and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
In a second aspect, an embodiment of the present invention provides a method for releasing a storage space, where the method is applied to a storage server of a distributed system, and the method includes:
receiving a target reference time point and an auxiliary time point which are sent by a management server of the distributed system; the target reference time point is selected from the recorded reference time points as a deleting basis when the management server detects that the distributed system meets a preset storage space release condition; the auxiliary time point is the current time point of the auxiliary clock acquired by the management server after the target reference time point is determined;
correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point;
and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
In a third aspect, an embodiment of the present invention provides a method for releasing a storage space, where the method is applied to a management server of a distributed system, and the method includes:
when detecting that the distributed system meets a preset storage space release condition, selecting a target reference time point as a deletion basis from the recorded multiple reference time points;
acquiring the current time point of an auxiliary clock as an auxiliary time point;
and sending the target reference time point and the auxiliary time point to each storage server in the distributed system, so that after receiving the target reference time point and the auxiliary time point, the storage server corrects the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain the corrected target reference time point, and deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
In a fourth aspect, an embodiment of the present invention provides a device for releasing a storage space, where the device is applied to a storage server of a distributed system, and the device includes:
the receiving module is used for receiving the target reference time point and the auxiliary time point which are sent by the management server of the distributed system; the target reference time point is selected from the recorded reference time points as a deleting basis when the management server detects that the distributed system meets a preset storage space release condition; the auxiliary time point is the current time point of the auxiliary clock acquired by the management server after the target reference time point is determined;
the deviation rectifying module is used for rectifying the deviation of the target reference time point by using the difference value between the current system time of the storage server and the auxiliary time point to obtain a rectified target reference time point;
and the deleting module is used for deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
In a fifth aspect, an embodiment of the present invention provides a device for releasing a storage space, where the device is applied to a management server of a distributed system, and the device includes:
the time point determining module is used for selecting a target reference time point as a deleting basis from the recorded multiple reference time points when the distributed system is detected to meet the preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point;
and the sending module is used for sending the target reference time point and the auxiliary time point to each storage server in the distributed system, so that after receiving the target reference time point and the auxiliary time point, the storage server corrects the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain the corrected target reference time point, and deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
In a sixth aspect, an embodiment of the present invention provides a storage server, where the storage server includes:
the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the bus; a memory for storing a computer program; and the processor is used for executing the program stored in the memory and realizing the steps of the method for releasing the storage space provided by the second aspect.
In a seventh aspect, an embodiment of the present invention provides a management server, where the management server includes:
the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the bus; a memory for storing a computer program; and a processor, configured to execute the program stored in the memory, and implement the steps of the method for releasing the storage space provided in the third aspect.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, which is included in a storage server, and the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the method for releasing storage space provided in the second aspect.
In a ninth aspect, an embodiment of the present invention provides a computer-readable storage medium, which is included in a management server, and the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the method for releasing storage space provided in the third aspect.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic structural diagram of a distributed system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for releasing a storage space according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for releasing a storage space according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a releasing apparatus for a storage space according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a releasing apparatus for a storage space according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a storage server according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a management server according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system time difference between some storage servers and other storage servers in the distributed system is large, which may cause the difference between the reference time point recorded by the management server and the local storage time point corresponding to the some servers to be large, and cause that when the some servers use the target reference time point to perform space release, the stored child objects may be deleted by mistake. For example, a certain child object SOb1 of a certain object Ob1 is larger than the reference time point RT1 of the object Ob1 recorded by the management server at the local storage time point of the storage server, and the reference time point of the object Ob1 is determined as the deletion criterion reference time point. When the storage space is released, since the local storage time point of the sub-object SOb1 is greater than the target reference time point RT1, the sub-object SOb1 is not deleted, resulting in missed deletion of the sub-object SOb1 that should be deleted. Alternatively, the local storage time point of the Sob2 of the other object Ob2 at the storage server is not equal to the reference time point RT2 of the object Ob2 recorded by the management server and is less than or equal to the target reference time point RT 1. Therefore, when the storage space is released, the child object Sob2 is deleted, resulting in the false deletion of the child object Sob2 that should not be deleted.
In order to reduce the erroneous deletion of the unit of the stored object and improve the accuracy of releasing the storage space, embodiments of the present invention provide a method and an apparatus for releasing the storage space, and a distributed system. The execution subject of the storage space release method may be a storage server of the distributed system, or may be a management server of the distributed system. For ease of understanding, the distributed system of an embodiment of the present invention is first described below.
In a specific application, the distributed system provided by the embodiment of the invention can be various. The distributed system may be a distributed storage system, a cloud storage system, a video system using a distributed architecture for data storage, and the like. Any distributed system is within the scope of the embodiments of the present invention and is not limited herein.
As shown in fig. 1, the distributed system according to an embodiment of the present invention may include:
a management server 101 configured to select a target reference time point as a basis for deletion from the plurality of recorded reference time points when it is detected that the distributed system satisfies a preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point; transmitting a target reference time point and an auxiliary time point to each storage server in the distributed system;
a storage server 102 for receiving a target reference time point and an auxiliary time point; correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point; and deleting the sub-object of which the local storage time is matched with the corrected target reference time point from the stored sub-objects.
In a specific application, any one of the management server 101 and the storage server 102 may be an electronic device capable of data processing. For example, the device may include a desktop computer, a portable computer, an internet television, an intelligent mobile terminal, a wearable intelligent terminal, a server, and the like, which are not limited herein, and any electronic device that can implement the embodiment of the present invention belongs to the protection scope of the embodiment of the present invention.
In the distributed system, the number of the storage servers 102 is plural, and the number of the management servers 101 may be plural or 1. If the number of the management servers 101 is multiple, a management server cluster can be formed, so that the management efficiency is improved, and the system abnormal risk caused by the abnormal management servers is reduced.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
For reasonable layout and easy understanding, the following describes a storage space release method according to an embodiment of the present invention from the perspective of interaction between the management server and the storage server.
As shown in fig. 2, the method for releasing storage space according to an embodiment of the present invention is applied to the distributed system according to the embodiment of fig. 1 of the present invention, and the method may include:
s201, when detecting that the distributed system meets a preset storage space release condition, the management server selects a target reference time point as a deletion basis from the recorded reference time points.
In a specific application, the management server may detect whether the distributed system meets a preset storage space release condition in various ways. For example, the detection manner may be that when the management server detects that the storage space of the distributed system reaches a preset threshold, it is determined that the distributed system is detected to meet a preset storage space release condition. The detection time when the storage space reaches the preset threshold may be according to a preset period, may be when the object is stored, or may be when the object storage is completed. Or, for example, the detection mode may be that the management server detects whether an instruction for releasing the storage space, which is input by a user, is received, and if so, determines that the distributed system is detected to meet a preset storage space release condition.
Any detection method capable of determining whether the distributed system meets the preset storage space release condition can be used in the present invention, which is not limited in this embodiment.
When the distributed system stores the object, the storage server reports the information about the storage completion to the management server after the storage of the sub-object of the object is completed according to the storage task issued by the management server. For example, the storage server may report the index information of the child object of the object that completes storage to the management server, or the storage server may report the notification information that completes storage to the management server. And after receiving the information reported by the storage server, the management server acquires the current time point of the auxiliary clock and records the current time point as the reference time point of the stored object, wherein the reference time point is the unified storage time point of each sub-object of the stored object stored in the storage server. Therefore, the management server has recorded a plurality of reference time points when detecting that the distributed system satisfies the preset storage space release condition.
In order to release the storage space by using the target reference time point in the subsequent steps S204 to S205, the target reference time point as a basis for deletion needs to be determined in step S201. The target reference time point may be selected in various ways. For example, the smallest time point may be selected as the target reference time point from among the plurality of recorded reference time points; the minimum time corresponds to the earliest storage time. Alternatively, for example, a preset number of time points may be selected as the target reference time points in order from small to large from among the recorded reference time points. Alternatively, for example, a specified time point may be selected as a target reference time point from among a plurality of reference time points that have been recorded. For example, a specified time point input by the user, or a preset specified time point, etc.
In addition, in two exemplary illustrations selected according to the size of the reference time point, the management server may perform ordered recording on the reference time point, so that when the target reference time point is determined, the reference time point may be directly selected from the recorded reference time points, steps of comparing the size and sorting are saved, and the release efficiency of the storage space is improved.
S202, the management server acquires the current time point of the auxiliary clock as an auxiliary time point.
The system time may vary between storage servers storing sub-objects of an object, and during the storage space release process, the management server determines from the object's perspective whether to delete. Therefore, the management server cannot directly record the local storage time point of the sub-object in the storage server as a deletion basis, but needs to determine the uniform storage time of the sub-object of a certain object; so that the management server can inform the respective storage servers of deleting the corresponding child objects using the uniform storage time point. For this purpose, an auxiliary clock is usually provided, which can unify the system times of the individual storage servers. The method specifically comprises the following steps: the management server determines a uniform time point according to the system time of all the storage servers, the uniform time point is used as an initial time point of the auxiliary clock, and the time point of the auxiliary clock continuously increases according to a preset clock increasing rule. For example, the management server determines that the unified time point is 20180910143056, i.e. 14 points at 10 days in 09 months in 2018, 30 minutes and 56 seconds, and the preset clock increment rule may be to increment the time point of the auxiliary clock by 1 per second.
The specific manner of determining a unified time point by the management server according to the system time of all the storage servers may be various. For example, the management server may use an average of the system times of all the storage servers as a uniform time point. For example, the largest and smallest system times among the system times of all the storage servers are removed, and the remaining system times are averaged. Or, for example, the management server may take the system time with the largest number of system times among the system times of all the storage servers as a unified time point. Any way that the management server determines a uniform time point according to the system time of all the storage servers can be used in the present invention, which is not limited in this embodiment.
And each time the object storage is completed, the management server records the current time point of the auxiliary clock as the reference time point of the stored object, the initial time point of the auxiliary clock is determined according to the system time of all the storage servers, and the difference between the system time of the storage servers and the reference time point is equivalent to the difference between the system time of the storage servers and the time point of the auxiliary clock. Therefore, for the case that the difference between the reference time of the object caused by the large difference of the system time between the storage servers and the local storage time of the sub-object of the object in the storage server is large, the current time point of the auxiliary clock can be obtained as the auxiliary time point. Thus, the target reference time point may be deskewed in subsequent step S203 using the difference value between the auxiliary time point and the current system time of the storage server.
S203, the management server sends the target reference time point and the auxiliary time point to each storage server in the distributed system.
S204, the storage server corrects the received target reference time point by using the difference value between the current system time of the storage server and the received auxiliary time point to obtain the corrected target reference time point.
In step S203, the management server sends the target reference time point and the auxiliary time point to each storage server in the distributed system, and the storage servers delete the sub-objects by using the received time points, so that the management server only needs to issue the corresponding time points once regardless of the number of the sub-objects to be deleted. Compared with the method that the management server determines the sub-objects to be deleted and then sends each sub-object to be deleted as a task to the storage server in the distributed system, the method can reduce the interaction times between the management server and the storage server and improve the release efficiency of the storage space.
In step S204, the storage server uses the difference between the current system time of the storage server and the received auxiliary time point to correct the received target reference time point in various ways. For example, the storage server may calculate a difference between the current system time of the storage server itself and the received auxiliary time point, and adjust the target reference time point according to the obtained difference, so as to obtain the corrected target reference time point. Or, for example, the storage server may calculate a difference between the current system time of the storage server itself and the received auxiliary time point, and adjust the target reference time point according to the obtained difference and a preset fluctuation threshold, so as to obtain the corrected target reference time point. For ease of understanding and reasonable layout, step S204 is described in detail in the following by way of alternative embodiments.
S205, the storage server deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
The local storage time point of the child object may be: and when the storage server finishes storing the sub-objects, storing the system time of the server. For example, the storage server may record the system time of the storage server itself as the local storage time point of the child object when the storage of the child object is completed.
In a specific application, the matching between the local storage time point and the rectified target reference time point may be various. For example, a locally stored time point that is less than or equal to the target reference time point may be determined to match the target reference time point. At this time, the deletion of the sub-object is performed according to the matching less than or equal to the matching, so that the deleted sub-object is guaranteed to be in the stored sub-object, and the storage time is relatively earliest. The child object stored relatively earliest in time is more in line with the user's intention to delete than the child object stored relatively later in time. Or, for example, the storage server may search for a time period corresponding to the received local storage time point from a preset correspondence between a target reference time point and the time period, and determine that the local storage time point belonging to the searched time period is matched with the target reference time point. For example, the time period found may be: in a time period 20180910143500 to 20180910150500 corresponding to the target reference time point 20180910143500, the child objects deleted by the storage server correspond to the child objects stored in 30 minutes from the target reference time point. At this time, more sub-objects can be deleted in one deletion process, more storage space is released, the step of releasing the storage space again caused by insufficient release of the storage space is saved, and the release efficiency of the storage space is improved.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
Optionally, in step S204: the method includes the following steps that a difference value between the current system time of a storage server and an auxiliary time point is utilized to correct a target reference time point, and the corrected target reference time point is obtained:
inputting the current system time, the auxiliary time point and the target reference time point of the storage server into a preset deviation correction formula to obtain a corrected target reference time point; wherein, the preset formula of rectifying includes:
Ser_time=del_time+(cur_time-loop_time+protect_time);
the method comprises the steps of correcting a target reference time point, a loop _ time and a protect _ time, wherein the Ser _ time is the corrected target reference time point, the del _ time is the target reference time point, the cur _ time is the current system time of a storage server, the loop _ time is an auxiliary time point, and the protect _ time is a preset fluctuation threshold. Specifically, the management server determines a uniform time point according to the system time of all the storage servers, takes the uniform time point as an initial time point of the auxiliary clock, and maintains the time point of the auxiliary clock to be continuously increased according to a preset clock increasing rule. And each time the object storage is completed, the management server records the current time point of the auxiliary clock as the reference time point of the stored object, wherein the reference time point is the unified storage time point of each sub-object of the stored object stored in the storage server. Based on the auxiliary clock, when the storage space is released, the management server issues a target reference time point del _ time as a basis for deletion to each storage server, and the time point of the auxiliary clock is used as an auxiliary time point loop _ time.
In a specific application, the preset fluctuation threshold may be set according to historical experience. For example, before the memory space is released in 2018, 3, 16, and the history data of the memory space release is analyzed, there is a case that the child object which should be deleted is not deleted because the local storage time is 1 greater than the target reference time point. At this time, a preset fluctuation threshold may be set to 1. Of course, the preset fluctuation threshold may be 0. The specific setting of the preset fluctuation threshold may be performed according to specific requirements, which is not limited in this embodiment. Compared with the situation that the preset fluctuation threshold value is not set, the size of the corrected target reference time point can be adjusted according to the situation that whether the specific storage space release is accurate or not, and the release accuracy of the storage space is improved.
Illustratively, the current system time of the storage server SS1 itself is divided into 10 months, 10 days and 15 points in 2018, 10 months and 10 days and 18 points in 2018, 10 months and 10 days and 15 points in 2018, 9 months and 10 days and 30 points in the target reference time, and a preset deviation correction formula, namely Ser _ time ═ del _ time + (cur _ time-loop _ time + protect _ time) ═ 9 months, 10 days and 15 points in 2018, 15 points in 10 months and 30 points in 2018 (2018 months, 10 days and 15 points in 2018, 10 months, 10 days and 18 points in 0) } 2018 months, 9 months, 10 days and 12 points in 2018, 12 points in 10 days and 30 points in 2018. Namely, for the storage server SS1, the corrected target reference time point is 9, 10, 12 and 30 minutes in 2018. Of course, for the storage server where there is no difference between the system time and the reference time, the rectified target reference time point is equal to the target reference time point.
Optionally, in step S205: after the storage server deletes the sub-object whose local storage time point matches the corrected target reference time point from the stored sub-objects, the method for releasing the storage space provided by the embodiment of the present invention may further include the following steps:
the storage server detects whether the storage server meets a preset storage space available amount condition; if yes, ending the release of the storage space, otherwise, adjusting the target reference time point according to the designated increment to obtain the current target reference time point; correcting the current target reference time point by using the difference value between the current system time of the storage server and the auxiliary time point to obtain the corrected current target reference time point; deleting the sub-object matched with the local storage time point and the corrected current target reference time point from the stored sub-objects; and returning to the step of executing the storage server to detect whether the storage server meets the preset storage space available amount condition.
In a specific application, there may be a case where after the storage space is released, the storage space of the storage server still cannot meet the storage requirement and needs to be released continuously. In this regard, in order to ensure that the storage space can be released until the size required by the storage is satisfied, and also consider that the deleted child objects are as few as possible, the storage server may detect whether the storage server itself satisfies a preset storage space availability condition after step S205. If so, indicating that the storage space has been released to the extent that the storage demand is met, the storage space does not need to be released continuously, and therefore, the release of the storage space can be ended. If the target sub-object is not deleted, the target reference time point can be adjusted to select the sub-object to be deleted from the non-deleted sub-objects. Since the deleted child object is the child object whose storage time point is relatively earliest, the target reference time point may be adjusted by a specified increment while continuing to release the storage space, so that the child object whose storage time point is relatively earliest in the undeleted child objects is deleted when the storage space is released using the current target reference time point.
The preset storage space available amount condition may be various. For example, the storage space of the storage server may be greater than or equal to a preset storage space threshold. Or, for example, an instruction sent by the management server to end the storage space release may be received. The instruction for ending the storage space release sent by the management server may specifically be an instruction input by a user. Any preset storage space availability condition can be used in the present invention, and the present embodiment does not limit this.
The method for adjusting the target reference time point by the storage server according to the designated increment to obtain the current target reference time point includes: and the storage server inputs the target reference time point and the designated increment into a preset incremental formula to obtain the current target reference time point. Wherein, the preset incremental formula is as follows: the current target reference time point is the target reference time point + the specified increment.
Illustratively, the storage server SS1 detects that the storage server SS1 does not satisfy the preset storage space availability condition, adjusts the target reference time point 2018 by a specified increment of 1 hour, 9/10/15/30, and obtains the current target reference time point 2018 by 9/10/16/30. Correcting the current target reference time point 2018, 9, 10, 16 and 30 minutes by using the difference value between the current system time of the storage server per se 2018, 10, 15 and the auxiliary time point 2018, 10, 18, 10 and 10 hours, namely-3 hours, to obtain the corrected current target reference time point 2018, 9, 10, 13 and 30 minutes; and deleting the sub-object matched with the local storage time point and the rectified current target reference time point from the stored sub-objects.
As shown in fig. 3, a flow of a method for releasing a storage space according to another embodiment of the present invention is applied to the distributed system according to the embodiment of fig. 3 of the present invention, and the method may include:
s301, when detecting that the distributed system meets the preset storage space release condition, the management server selects a target reference time point as a deletion basis from the recorded reference time points.
S302, the management server acquires the current time point of the auxiliary clock as an auxiliary time point.
And S303, the management server sends the target reference time point and the auxiliary time point to each storage server in the distributed system.
S301 to S303 are the same as S201 to S203 in the embodiment of fig. 2 of the present invention, and are not repeated herein, for details, see the description of the embodiment of fig. 2 of the present invention.
S304, the management server specifies target index information as a basis for deletion from the plurality of index information. Wherein the index information includes: the identity of the virtual resource pool in which the child object is stored, and/or the identity of the object.
In specific application, the problem that the sub-object of the object which does not need to be deleted is deleted due to the fact that the local storage time of the sub-object of the object which does not need to be deleted in the storage server is matched with the corrected target reference time point may exist; and the sub-object of the object to be deleted is not matched with the rectified target reference time point in the local storage time of the storage server, so that the sub-object of the object to be deleted is not deleted. Moreover, when the storage server deletes the child object whose local storage time point matches the target reference time point, the child object needs to be deleted from all the stored child objects, and the retrieval range during deletion is too large, which may cause a problem of lowering the deletion efficiency.
In this regard, the management server may determine target index information as a basis for deletion from the plurality of index information, so that the subsequent storage server may narrow down the retrieval range at the time of deletion using the virtual resource pool identifier in the target index information and ensure accurate deletion of the child object using the object identifier in the target index information in step S307. The determining method of the target index information may specifically include: and searching an object corresponding to the target reference time point from the corresponding relation between the pre-stored reference time point and the object, and determining the index information of the searched object as target index information.
In addition, in a specific application, in order to ensure that the granularity of the stored data is small, the data is relatively more accurate, and the fine management of the data is realized, for example, the video content may be stored as a plurality of sub-objects with the duration of the second level, so that the management may be performed on the second level. To this end, the storage hierarchy of the child object may specifically include: the object is a unit, one object may be divided into a plurality of pieces, N (e.g., 5/10, etc.) units form one stripe, all the objects include a plurality of units, and the sub-objects stored in the storage server are the units. In addition, in order to facilitate execution of different preset storage space release conditions for different objects, multiple objects of the same type may be stored in the same virtual resource pool (Bucket). For example, the data stored in virtual resource pool B1 may not be deleted, and the virtual resource pool identification in the target index information may not be the identification of virtual resource pool B1; the object in virtual resource pool B2 satisfies the preset storage space release condition, and the identification of virtual resource pool B2 can be included in the target index information.
Correspondingly, according to the storage hierarchy, the index information of the child object may specifically include: an identification of a virtual resource pool, an object identification, and a bar identification. Based on this, when the storage space is released, the management server may determine the target index information as a deletion basis from the plurality of index information through the step S304, and delete the sub-object according to the target index information and the target reference time point in the subsequent step S307, thereby accurately deleting all the sub-objects under the target index information. For example, object1 in a certain virtual resource pool B1 needs to be deleted, and the bars constituting the object include bar st1 and bar st 2; when the deletion of the child object is performed according to the target index information and the target reference time point, all the units in the bar st1 having the identification of the object1 and the units in the bar st2 having the identification of the object1 may be deleted with respect to the virtual resource pool B1. At this time, compared with the case that no target index information is used as a deleting basis, when the local storage time of the sub-object of the object to be deleted in the storage server is not matched with the corrected target reference time point, the sub-object can be deleted according to the target index information and the target reference time point, and the object can be completely deleted. And compared with the deletion only according to the virtual resource pool identification and the target reference time point, the deletion of the sub-objects of the object which does not need to be deleted can be avoided, namely, the deleted unit can be ensured to improve the release accuracy of the storage space.
In addition, the execution order of step S304 may be various. Illustratively, step S304 may be performed simultaneously with step S302, may be performed before step S302, or may be performed after step S302.
S305, the management server sends the target index information to each storage server of the distributed system.
In a specific application, the execution sequence of step S305 may be various. Illustratively, step S305 may be performed simultaneously with step S303, may be performed before step S303, or may be performed after step S303. When step S305 and step S303 are executed simultaneously, the information required for space release is uniformly distributed, so that the time delay caused by multiple distribution and the occupation of the processing resources of the management server by multiple interactions between the management server and the storage server can be reduced.
S306, the storage server corrects the received target reference time point by using the difference value between the current system time of the storage server and the received auxiliary time point to obtain the corrected target reference time point.
S306 is the same as S204 in the embodiment of fig. 2, and is not repeated herein, for details, see the description of the embodiment of fig. 2.
S307, the storage server deletes the sub-object matched with the corrected target reference time point from the stored sub-objects by using the target index information.
In a specific application, the storage server may delete the sub-object whose local storage time matches the rectified target reference time point from the stored sub-objects by using the target index information in a variety of specific ways. For example, the storage server may match the target index information, the local storage time, and the rectified target reference time point as parallel retrieval conditions, retrieve sub-objects satisfying the two parallel retrieval conditions, and delete the retrieved sub-objects. For example, object1 in a certain virtual resource pool B1 needs to be deleted, and the bars constituting the object include bar st1 and bar st 2; when the sub-object is deleted according to the target index information and the target reference time point, the unit in the bar st1 and the unit in the bar st2 which belong to the virtual resource pool B1 and are identified by the object1 can be retrieved and deleted, wherein the local storage time is matched with the rectified target reference time point.
Or, for example, when the target index information includes the object identifier, the storage server may first retrieve the sub-object whose local storage time point matches the corrected target reference time point, then screen out the sub-object having the target index information in the retrieval result, and delete the screened sub-object, so as to ensure that the object to be deleted is completely deleted, the object that does not need to be deleted may be completely stored, and the sub-object is not deleted by mistake. For example, object1 in a certain virtual resource pool B1 needs to be deleted, and the bars constituting the object include bar st1 and bar st 2. Units of which the local storage time is matched with the rectified target reference time point can be retrieved, and the sub-objects in the bar st1 and the sub-objects in the bar st2 which belong to the virtual resource pool B1 and are identified by the object1 are screened from the retrieved units to be deleted. Of course, in the above two exemplary illustrations, if a certain type of object is not stored as a virtual resource pool, it may be directly retrieved according to the retrieval conditions in the exemplary illustrations, and it is not necessary to retrieve the virtual resource pool.
Or, for example, when the target index information includes the identifier of the virtual resource pool, the storage server may first narrow the search range to the virtual resource pool having the identifier of the virtual resource pool, search, in the virtual resource pool having the identifier of the virtual resource pool, the sub-object whose local storage time point matches the rectified target reference time point, and delete the searched sub-object. For example, an object1 needs to be deleted, and the bars constituting the object include a bar st1 and a bar st 2. The units with the local storage time matched with the rectified target reference time point can be retrieved aiming at the virtual resource pool B1, and the sub-objects in the bar st1 and the sub-objects in the bar st2 with the identification of the object1 are screened from the retrieved units to be deleted.
In the embodiment of fig. 3 of the present invention, the retrieval range during deletion is narrowed down by the virtual resource pool identifier in the target index information, and the object identifier in the target index information ensures that the object to be deleted is completely deleted, and the sub-object of the object not to be deleted is not deleted by mistake, thereby ensuring the integrity of the object not to be deleted.
In addition, after determining the target index information, the management server may delete the target index information displayed to the user, or may indicate that the object corresponding to the target index information is deleted when displaying the target index information to the user, so as to ensure that the index information is consistent with the object stored in the storage server. For example, the target index information is object1 and strip1, and object1 and strip1 can be deleted from the index information, or object1 and strip1 can be indicated to be deleted from the index information displayed to the user. At this time, the problem that the object corresponding to the index cannot be searched due to the fact that the object is deleted and the index is not deleted can be avoided, and consistency of the index information and the storage condition is guaranteed.
As shown in fig. 4, an apparatus for releasing storage space according to an embodiment of the present invention is applied to a storage server of a distributed system, and the apparatus may include:
a receiving module 401, configured to receive a target reference time point and an auxiliary time point sent by a management server of the distributed system; the target reference time point is selected from the recorded reference time points as a deleting basis when the management server detects that the distributed system meets a preset storage space release condition; the auxiliary time point is the current time point of the auxiliary clock acquired by the management server after the target reference time point is determined;
a deviation rectifying module 402, configured to rectify the target reference time point by using a difference value between the current system time of the storage server itself and the auxiliary time point, so as to obtain a rectified target reference time point;
a deleting module 403, configured to delete the sub-object whose local storage time point matches the rectified target reference time point from the stored sub-objects.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
Optionally, the deviation rectifying module 402 is specifically configured to:
inputting the current system time of the storage server, the auxiliary time point and the target reference time point into a preset deviation correction formula to obtain a corrected target reference time point; wherein, the preset deviation rectifying formula comprises:
Ser_time=del_time+(cur_time-loop_time+protect_time);
the server comprises a server body, a server side, a loop side, a host side and a host side, wherein the server side is connected with the server side through the server side, the server side is connected with the server side through the link side, the server side is connected with.
Optionally, the receiving module 401 is further configured to:
receiving target index information sent by the management server; the target index information is index information which is determined by the management server from a plurality of index information and is used as a deleting basis; the index information includes: storing the identifier of the virtual resource pool of the sub-object, and/or the object identifier;
the deleting module 403 is specifically configured to:
and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects by using the target index information.
Optionally, the apparatus further comprises: a detection module;
the detection module is used for detecting whether the storage server meets a preset storage space available amount condition or not after deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects; if yes, the release of the storage space is finished, otherwise, the deviation rectifying module 402 is triggered to adjust the target reference time point according to the designated increment to obtain the current target reference time point;
the deviation rectifying module 402 is further configured to rectify the current target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point, so as to obtain a rectified current target reference time point;
the deleting module 403 is further configured to delete the sub-object whose local storage time point matches the rectified current target reference time point from the stored sub-objects, and trigger the detecting module to execute the detection whether the storage server itself meets a preset storage space availability condition.
As shown in fig. 5, an apparatus for releasing storage space according to an embodiment of the present invention is applied to a management server of a distributed system, and the apparatus may include:
a time point determining module 501, configured to select a target reference time point as a basis for deletion from the recorded multiple reference time points when it is detected that the distributed system meets a preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point;
a sending module 502, configured to send the target reference time point and the auxiliary time point to each storage server in the distributed system, so that after receiving the target reference time point and the auxiliary time point, the storage server corrects the target reference time point by using a difference between a current system time of the storage server and the auxiliary time point, so as to obtain a corrected target reference time point, and deletes a sub-object, which is matched between a local storage time point and the corrected target reference time point, from stored sub-objects.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
Optionally, the apparatus further comprises: an index information determination module;
the index information determining module is used for determining target index information serving as a deleting basis from a plurality of index information and sending the target index information to each storage server in the distributed system, so that the storage servers delete sub-objects with local storage time points matched with the corrected target reference time points from the stored sub-objects by using the target index information after receiving the target index information;
wherein the index information includes: the identity of the virtual resource pool in which the child object is stored, and/or the identity of the object.
Corresponding to the foregoing embodiment, an embodiment of the present invention further provides a storage server, as shown in fig. 6, where the storage server may include:
the system comprises a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory complete mutual communication through the communication bus 604 through the 603;
a memory 603 for storing a computer program;
the processor 601 is configured to implement the steps of the method for releasing the storage space applied to the storage server in any of the embodiments when executing the computer program stored in the memory 603.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
An embodiment of the present invention further provides a management server, as shown in fig. 7, where the management server may include:
the system comprises a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory are communicated with each other through the communication bus 704 via the communication interface 703;
a memory 703 for storing a computer program;
the processor 701 is configured to implement the steps of the method for releasing the storage space applied to the management server in any of the embodiments described above when executing the computer program stored in the memory 703.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The computer-readable storage medium provided by an embodiment of the present invention is included in a storage server, and a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the method for releasing the storage space applied to the storage server in any of the above embodiments.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
The computer-readable storage medium provided by an embodiment of the present invention is included in a management server, and a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for releasing the storage space applied to the management server in any of the embodiments.
In the scheme provided by the embodiment of the invention, the initial time point of the auxiliary clock is obtained according to the system time of all the storage servers, and the reference time point used as the basis for deletion is the time point of the auxiliary clock; and, the local storage time point of the child object in the storage server is the system time of the storage server at the time of completing the storage of the child object. Therefore, the difference value between the current system time of the storage server and the current time point of the auxiliary clock serving as the auxiliary time point can reflect the difference value between the target reference time point and the local storage time point of the sub-object, and can be used for correcting the target reference time point; therefore, the difference between the corrected target reference time point and the system time of the storage server is corrected compared with the target reference time point. Therefore, for the situation that the system time of each storage server in the distributed system has a large difference, when the storage space is released, the stored sub-object is deleted by using the corrected target reference time point, so that the difference value between the corrected target reference time point and the local storage time point of the sub-object is ensured to be smaller than the difference value between the target reference time point and the local storage time point of the sub-object, thereby reducing the deletion error of the sub-object caused by the large difference between the target reference time point and the local storage time point of the sub-object in the storage server and improving the release accuracy of the storage space.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions that, when run on a storage server, cause the storage server to perform the method for releasing storage space applied to the storage server in any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions that, when run on a management server, cause the management server to perform the method for releasing storage space applied to the management server in any of the above embodiments.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center via a wired (e.g., coaxial cable, fiber optic, DS L (Digital Subscriber line L ine), or wireless (e.g., infrared, radio, microwave, etc.) manner to transmit to another website, computer, server, or data center via a wired (e.g., Digital Subscriber line), or optical (e.g., infrared, radio, microwave, etc.) medium, which may be a Solid state disk (DVD), or optical disk (SSD), etc.), or a Solid state disk (optical disk, DVD, etc.), or any combination thereof.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, storage server, management server and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some parts of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A distributed system, the system comprising:
the management server is used for selecting a target reference time point as a deleting basis from the recorded multiple reference time points when the distributed system is detected to meet the preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point; transmitting the target reference time point and the auxiliary time point to each storage server in the distributed system;
the storage server is used for receiving the target reference time point and the auxiliary time point; correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point; and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
2. The system according to claim 1, wherein the storage server uses a difference value between a current system time of the storage server itself and the auxiliary time point to correct the target reference time point, so as to obtain a corrected target reference time point, and the method comprises:
inputting the current system time of the storage server, the auxiliary time point and the target reference time point into a preset deviation correction formula to obtain a corrected target reference time point; wherein, the preset deviation rectifying formula comprises:
Ser_time=del_time+(cur_time-loop_time+protect_time);
the server comprises a server body, a server side, a loop side, a host side and a host side, wherein the server side is connected with the server side through the server side, the server side is connected with the server side through the link side, the server side is connected with.
3. The system of claim 1, wherein the management server is further configured to:
determining target index information serving as a deleting basis from a plurality of index information, and sending the target index information to each storage server of the distributed system; wherein the index information includes: storing the identifier of the virtual resource pool of the sub-object, and/or the object identifier;
the storage server is further used for receiving the target index information;
the storage server deletes the sub-object matched with the corrected target reference time point from the stored sub-objects, and the method comprises the following steps:
and the storage server deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects by using the target index information.
4. The system of any of claims 1-2, wherein the storage server is further configured to:
after deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects, detecting whether the storage server meets a preset storage space available amount condition;
if yes, ending the release of the storage space, otherwise, adjusting the target reference time point according to the designated increment to obtain the current target reference time point; correcting the current target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected current target reference time point; deleting the sub-object matched with the local storage time point and the corrected current target reference time point from the stored sub-objects; and returning to execute the detection of whether the storage server meets the preset storage space available quantity condition.
5. A method for releasing storage space is applied to a storage server of a distributed system, and comprises the following steps:
receiving a target reference time point and an auxiliary time point which are sent by a management server of the distributed system; the target reference time point is selected from the recorded reference time points as a deleting basis when the management server detects that the distributed system meets a preset storage space release condition; the auxiliary time point is the current time point of the auxiliary clock acquired by the management server after the target reference time point is determined;
correcting the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected target reference time point;
and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
6. The method according to claim 5, wherein the step of utilizing the difference between the current system time of the storage server itself and the auxiliary time point to correct the target reference time point to obtain a corrected target reference time point comprises:
inputting the current system time of the storage server, the auxiliary time point and the target reference time point into a preset deviation correction formula to obtain a corrected target reference time point; wherein, the preset deviation rectifying formula comprises:
Ser_time=del_time+(cur_time-loop_time+protect_time);
the server comprises a server body, a server side, a loop side, a host side and a host side, wherein the server side is connected with the server side through the server side, the server side is connected with the server side through the link side, the server side is connected with.
7. The method of claim 5, further comprising:
receiving target index information sent by the management server; the target index information is index information which is determined by the management server from a plurality of index information and is used as a deleting basis; the index information includes: storing the identifier of the virtual resource pool of the sub-object, and/or the object identifier;
the deleting the sub-object of which the local storage time is matched with the corrected target reference time point from the stored sub-objects comprises:
and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects by using the target index information.
8. The method according to any of claims 5 to 6, wherein after deleting the sub-object from the stored sub-objects whose local storage time point matches the de-skewed target reference time point, the method further comprises:
detecting whether the storage server meets a preset storage space available amount condition or not;
if yes, ending the release of the storage space, otherwise, adjusting the target reference time point according to the designated increment to obtain the current target reference time point;
correcting the current target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain a corrected current target reference time point;
and deleting the sub-object matched with the local storage time point and the corrected current target reference time point from the stored sub-objects, and returning to execute the detection of whether the storage server meets the preset storage space available amount condition.
9. A method for releasing storage space is applied to a management server of a distributed system, and comprises the following steps:
when detecting that the distributed system meets a preset storage space release condition, selecting a target reference time point as a deletion basis from the recorded multiple reference time points;
acquiring the current time point of an auxiliary clock as an auxiliary time point;
and sending the target reference time point and the auxiliary time point to each storage server in the distributed system, so that after receiving the target reference time point and the auxiliary time point, the storage server corrects the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain the corrected target reference time point, and deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
10. The method of claim 9, further comprising:
determining target index information serving as a deleting basis from a plurality of index information, and sending the target index information to each storage server in the distributed system, so that the storage servers delete sub-objects with local storage time points matched with the corrected target reference time points from the stored sub-objects by using the target index information after receiving the target index information;
wherein the index information includes: the identity of the virtual resource pool in which the child object is stored, and/or the identity of the object.
11. An apparatus for releasing storage space, which is applied to a storage server of a distributed system, the apparatus comprising:
the receiving module is used for receiving the target reference time point and the auxiliary time point which are sent by the management server of the distributed system; the target reference time point is selected from the recorded reference time points as a deleting basis when the management server detects that the distributed system meets a preset storage space release condition; the auxiliary time point is the current time point of the auxiliary clock acquired by the management server after the target reference time point is determined;
the deviation rectifying module is used for rectifying the deviation of the target reference time point by using the difference value between the current system time of the storage server and the auxiliary time point to obtain a rectified target reference time point;
and the deleting module is used for deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
12. The apparatus of claim 11, wherein the rectification module is specifically configured to:
inputting the current system time of the storage server, the auxiliary time point and the target reference time point into a preset deviation correction formula to obtain a corrected target reference time point; wherein, the preset deviation rectifying formula comprises:
Ser_time=del_time+(cur_time-loop_time+protect_time);
the server comprises a server body, a server side, a loop side, a host side and a host side, wherein the server side is connected with the server side through the server side, the server side is connected with the server side through the link side, the server side is connected with.
13. The apparatus of claim 11, wherein the receiving module is further configured to:
receiving target index information sent by the management server; the target index information is index information which is determined by the management server from a plurality of index information and is used as a deleting basis; the index information includes: storing the identifier of the virtual resource pool of the sub-object, and/or the object identifier;
the deletion module is specifically configured to:
and deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects by using the target index information.
14. The apparatus of any one of claims 11 to 12, further comprising: a detection module;
the detection module is used for detecting whether the storage server meets a preset storage space available amount condition or not after deleting the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects; if yes, ending the release of the storage space, otherwise, triggering the deviation correction module to adjust the target reference time point according to the designated increment to obtain the current target reference time point;
the correction module is further configured to correct the current target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point, so as to obtain a corrected current target reference time point;
the deleting module is further configured to delete the sub-object whose local storage time point matches the rectified current target reference time point from the stored sub-objects, and trigger the detecting module to perform the detection on whether the storage server itself meets a preset storage space availability condition.
15. An apparatus for releasing storage space, applied to a management server of a distributed system, the apparatus comprising:
the time point determining module is used for selecting a target reference time point as a deleting basis from the recorded multiple reference time points when the distributed system is detected to meet the preset storage space release condition; acquiring the current time point of an auxiliary clock as an auxiliary time point;
and the sending module is used for sending the target reference time point and the auxiliary time point to each storage server in the distributed system, so that after receiving the target reference time point and the auxiliary time point, the storage server corrects the target reference time point by using a difference value between the current system time of the storage server and the auxiliary time point to obtain the corrected target reference time point, and deletes the sub-object matched with the local storage time point and the corrected target reference time point from the stored sub-objects.
16. The apparatus of claim 15, further comprising: an index information determination module;
the index information determining module is used for determining target index information serving as a deleting basis from a plurality of index information and sending the target index information to each storage server in the distributed system, so that the storage servers delete sub-objects with local storage time points matched with the corrected target reference time points from the stored sub-objects by using the target index information after receiving the target index information;
wherein the index information includes: the identity of the virtual resource pool in which the child object is stored, and/or the identity of the object.
CN201910826429.9A 2019-09-03 2019-09-03 Method and device for releasing storage space and distributed system Active CN111399754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910826429.9A CN111399754B (en) 2019-09-03 2019-09-03 Method and device for releasing storage space and distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910826429.9A CN111399754B (en) 2019-09-03 2019-09-03 Method and device for releasing storage space and distributed system

Publications (2)

Publication Number Publication Date
CN111399754A true CN111399754A (en) 2020-07-10
CN111399754B CN111399754B (en) 2023-11-03

Family

ID=71434023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910826429.9A Active CN111399754B (en) 2019-09-03 2019-09-03 Method and device for releasing storage space and distributed system

Country Status (1)

Country Link
CN (1) CN111399754B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433809A (en) * 2020-11-05 2021-03-02 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201726424U (en) * 2009-08-18 2011-01-26 升东网络科技发展(上海)有限公司 Distributed storage system
US20130061232A1 (en) * 2011-09-02 2013-03-07 Ilt Innovations Ab Method And Device For Maintaining Data In A Data Storage System Comprising A Plurality Of Data Storage Nodes
US20140379670A1 (en) * 2013-06-19 2014-12-25 Sap Ag Data Item Deletion in a Database System
JP2015109053A (en) * 2013-12-05 2015-06-11 ブラザー工業株式会社 Written data processing system
US9152578B1 (en) * 2013-03-12 2015-10-06 Emc Corporation Securing data replication, backup and mobility in cloud storage
US20160231934A1 (en) * 2015-02-09 2016-08-11 International Business Machines Corporation Management of extents for space efficient storage volumes by reusing previously allocated extents
US20160379196A1 (en) * 2015-06-26 2016-12-29 Seiko Epson Corporation Network System, Control Method of a Network System, and Management Server
CN107734008A (en) * 2017-09-27 2018-02-23 柏科数据技术(深圳)股份有限公司 Method, apparatus, node device and the storage medium of a kind of troubleshooting in data-storage system
CN109558065A (en) * 2017-09-25 2019-04-02 杭州海康威视***技术有限公司 Data-erasure method and distributed memory system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201726424U (en) * 2009-08-18 2011-01-26 升东网络科技发展(上海)有限公司 Distributed storage system
US20130061232A1 (en) * 2011-09-02 2013-03-07 Ilt Innovations Ab Method And Device For Maintaining Data In A Data Storage System Comprising A Plurality Of Data Storage Nodes
US9152578B1 (en) * 2013-03-12 2015-10-06 Emc Corporation Securing data replication, backup and mobility in cloud storage
US20140379670A1 (en) * 2013-06-19 2014-12-25 Sap Ag Data Item Deletion in a Database System
JP2015109053A (en) * 2013-12-05 2015-06-11 ブラザー工業株式会社 Written data processing system
US20160231934A1 (en) * 2015-02-09 2016-08-11 International Business Machines Corporation Management of extents for space efficient storage volumes by reusing previously allocated extents
US20160379196A1 (en) * 2015-06-26 2016-12-29 Seiko Epson Corporation Network System, Control Method of a Network System, and Management Server
CN109558065A (en) * 2017-09-25 2019-04-02 杭州海康威视***技术有限公司 Data-erasure method and distributed memory system
CN107734008A (en) * 2017-09-27 2018-02-23 柏科数据技术(深圳)股份有限公司 Method, apparatus, node device and the storage medium of a kind of troubleshooting in data-storage system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433809A (en) * 2020-11-05 2021-03-02 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium
CN112433809B (en) * 2020-11-05 2023-12-22 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111399754B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
US10949253B2 (en) Data forwarder for distributed data acquisition, indexing and search system
CN110851308A (en) Test method, test device, electronic equipment and storage medium
CN107656807B (en) Automatic elastic expansion method and device for virtual resources
CN108710681B (en) File acquisition method, device, equipment and storage medium
CN107315825B (en) Index updating system, method and device
JP2019523499A (en) Method and device for pushing application messages
CN111488377A (en) Data query method and device, electronic equipment and storage medium
CN111399754A (en) Storage space release method and device and distributed system
CN112217657A (en) Data transmission method, data processing method, device and medium based on SD-WAN system
CN114281648A (en) Data acquisition method and device, electronic equipment and storage medium
CN111783107B (en) Multi-source trusted data access method, device and equipment
CN109976828B (en) Method and device for configuring file
CN110677683B (en) Video storage and video access method and distributed storage and video access system
CN112395337B (en) Data export method and device
CN108156086B (en) Policy rule issuing method and device
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
JP6574310B2 (en) Evaluation information matching method, apparatus and server
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN111291127B (en) Data synchronization method, device, server and storage medium
CN110457332B (en) Information processing method and related equipment
CN110223108B (en) Click through rate prediction method, device and equipment
CN113760854A (en) Method for identifying data in HDFS memory and related equipment
CN113282601A (en) Data updating method and device and electronic equipment
CN111367703A (en) Troubleshooting method and device
CN110691143A (en) File pushing method and device, electronic equipment and medium

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