A storage control method and device applied to an object storage system

By adjusting the capacity control flag and the judgment of storage change in the object storage system, the problem of frequent quota capacity judgment was solved, system resource overhead was reduced, and business operation performance was improved.

CN115185463BActive Publication Date: 2025-12-19MACROSAN TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210833408.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-14
Publication Date
2025-12-19
Estimated Expiration
2042-07-14

AI Technical Summary

Technical Problem

In object storage systems, frequent checks to see if the quota has been exceeded and frequent updates to the storage size of data buckets lead to high system resource overhead and affect the performance of business operations.

Method used

By adjusting the capacity control flag when the capacity quota of an account and data bucket changes, and combining the storage volume change within a specified time period to determine whether the quota has been exceeded, multiple comparisons are reduced, and the storage volume statistics table is only updated synchronously after the specified time period ends.

Benefits of technology

It reduces system resource overhead, improves business operation performance, and avoids frequent updates to the storage statistics table.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185463B_ABST
    Figure CN115185463B_ABST
Patent Text Reader

Abstract

The application provides a storage control method and device applied to an object storage system. When the total quota of the account capacity of an account changes, the total quota of the data bucket capacity of a data bucket changes, or the storage capacity of the data bucket changes due to an operation performed, the capacity control identifier used for identifying the storage control in the data bucket is automatically adjusted according to the changes, so that the storage control is controlled according to the capacity control identifier. Therefore, it is not necessary to compare whether the total capacity exceeds the quota multiple times when storing objects, the system overhead is reduced, and after the operation performed on the data bucket within a specified time period and causing the change of the storage capacity is completed, the storage capacity statistics table is synchronously updated, the frequent updating of the storage capacity statistics table is avoided, and the performance of the business operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, in particular to a storage control method and device applied to an object storage system. BACKGROUND

[0002] With the advent of the era of big data, object storage is widely used. When storing data, it is generally stored in the form of objects, that is, object storage. In the face of massive data storage requirements, how to effectively control storage becomes necessary.

[0003] In object storage, the account storage amount used by an account and the data bucket storage amount of a data bucket used are first obtained, and then it is determined whether the account storage amount used and the data bucket storage amount used exceed the corresponding quota capacity, so as to determine whether the data bucket can continue to store data. When the data bucket can continue to store data, the object is stored in the data bucket, and the storage amount corresponding to the data bucket is updated synchronously. In this way, in the face of massive data storage requirements, it will be determined whether the quota capacity is exceeded and the storage amount corresponding to the data bucket is frequently updated, which aggravates the system resource overhead, thereby affecting the performance of business operations. SUMMARY

[0004] Therefore, the present application provides a storage control method and device applied to an object storage system to solve the problem of large system resource overhead in object storage in the prior art.

[0005] Specifically, the present application is implemented by the following technical solutions:

[0006] The present application provides a storage control method applied to an object storage system, which comprises:

[0007] When the account capacity total quota of an account in the account attribute information configured by the object storage system changes from a first account capacity quota to a second account capacity quota, the capacity control identifier of each data bucket associated with the account is adjusted according to the second account capacity quota, wherein the capacity control identifier is used for storage control;

[0008] When the data bucket total capacity quota of a data bucket in the data bucket attribute information associated with an account changes from a first data bucket capacity quota to a second data bucket capacity quota, the capacity control identifier of the data bucket is adjusted according to the second data bucket capacity quota;

[0009] According to the operation performed on a data bucket in a specified time period and causing the storage amount to change, the storage amount change amount in the specified time period is determined, it is determined whether the current storage amount of the data bucket exceeds the quota according to the storage amount change amount, and the capacity control identifier of the data bucket is adjusted according to the determination result.

[0010] The application also provides a storage control device applied to an object storage system, the device comprising:

[0011] The first adjusting module is configured to adjust the capacity control identifier of each data bucket associated with an account when the total account capacity quota of the account in the account attribute information of the object storage system changes from a first account capacity quota to a second account capacity quota, wherein the capacity control identifier is used for storage control.

[0012] The second adjusting module is configured to adjust the capacity control identifier of a data bucket when the total data bucket capacity quota of the data bucket in the data bucket attribute information of an account changes from a first data bucket capacity quota to a second data bucket capacity quota.

[0013] The third adjusting module is configured to determine the storage amount change in a specified time period according to the operations performed on a data bucket in the specified time period, determine whether the current storage amount of the data bucket exceeds the quota according to the storage amount change, and adjust the capacity control identifier of the data bucket according to the determination result.

[0014] The embodiments of the application provide at least the following beneficial effects:

[0015] In the embodiments of the application, when the total account capacity quota of an account changes, the total data bucket capacity quota of a data bucket changes, or the storage amount of the data bucket changes due to the operations performed, the capacity control identifier used for identifying the storage control in the data bucket is automatically adjusted according to the changes, so that the storage control is performed according to the capacity control identifier, and it is not necessary to compare whether the capacity quota is exceeded multiple times when the object is stored, thereby reducing the system overhead. In addition, the storage amount statistics table is updated only after the operations performed on the data bucket in the specified time period are completed, thereby avoiding frequent updating of the storage amount statistics table, and improving the performance of the business operation.

[0016] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings incorporated in the specification and forming a part of the specification illustrate embodiments consistent with the present specification and, together with the specification, serve to explain the principles of the present specification.

[0018] Figure 1 is a flowchart of a storage control method applied to an object storage system according to an exemplary embodiment of the application;

[0019] Figure 2 FIG. 1 is a schematic diagram of an allocation capacity quota in object storage according to an example embodiment of the present disclosure;

[0020] Figure 3 FIG. 2 is a flowchart of a method for updating a storage amount statistics table and a capacity control identifier corresponding to a data bucket according to an example embodiment of the present disclosure;

[0021] Figure 4 FIG. 3 is a block diagram of a storage control device applied to an object storage system according to an example embodiment of the present disclosure;

[0022] Figure 5 FIG. 4 is a structural schematic diagram of an electronic device according to an example embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] The example embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements, unless the context clearly shows otherwise. The following description of example embodiments is not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0024] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. As used in this description and the appended claims, the singular forms “a,” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and / or” as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0025] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish different sets of information from one another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information without departing from the scope of the present disclosure. As used herein, the word “if’ can be interpreted to mean “when” or “upon” or “in response to determining” depending on the context.

[0026] When storing an object, the used account storage of an account and the used data bucket storage of a data bucket are obtained first, and then it is determined whether the used account storage and the used data bucket storage exceed the corresponding quota capacity, so as to determine whether the data bucket can continue to store data currently. When it is determined that the data bucket can continue to store data, the object is stored in the data bucket, and the storage amount corresponding to the data bucket is updated synchronously. In this way, when facing massive data storage requirements, the system resource overhead is aggravated due to the multiple determinations of whether the quota capacity is exceeded and the frequent updates of the storage amount corresponding to the data bucket, thereby affecting the performance of business operations.

[0027] To solve the above problems, the present application provides a storage control method applied to an object storage system, which comprises:

[0028] When the account capacity total quota of an account in the account attribute information configured by the object storage system changes from a first account capacity quota to a second account capacity quota, the capacity control identifier of each data bucket associated with the account is adjusted according to the second account capacity quota, wherein the capacity control identifier is used for storage control.

[0029] When the data bucket total capacity quota of a data bucket in the data bucket attribute information associated with an account changes from a first data bucket capacity quota to a second data bucket capacity quota, the capacity control identifier of the data bucket is adjusted according to the second data bucket capacity quota.

[0030] According to the operations performed on a data bucket in a specified time period and causing the change of the storage amount, the change amount of the storage amount in the specified time period is determined, it is determined whether the current storage amount of the data bucket exceeds the quota according to the change amount of the storage amount, and the capacity control identifier of the data bucket is adjusted according to the determination result.

[0031] Through the above method, when the account capacity total quota of an account changes, the data capacity total quota of a data bucket changes, or the storage amount of the data bucket changes due to the operations performed and causing the change of the storage amount, the capacity control identifier used for identifying the storage control in the data bucket is automatically adjusted according to the above changes, so that the storage control is performed according to the capacity control identifier. Without comparing multiple times to determine whether the quota capacity is exceeded when storing an object, the system overhead is reduced, and after the operations performed on a data bucket in a specified time period and causing the change of the storage amount are completed, the storage amount statistics table is updated synchronously, thereby avoiding frequent updates of the storage amount statistics table, and improving the performance of business operations.

[0032] Referring to Figure 1 , Figure 1 A flowchart of a storage control method applied to an object storage system is provided in the present application. The flow of the method can comprise the following steps:

[0033] Step 101, when the account property information of the object storage system is configured to change the account capacity quota from the first account capacity quota to the second account capacity quota, the capacity control identifier of each data bucket associated with the account is adjusted according to the second account capacity quota.

[0034] In the embodiment, the object storage system herein, such as at least one server or electronic storage device, is not specifically limited to the structure of the object storage system.

[0035] In application, the object storage system is usually configured with at least one account property information, such as: the account property information can be an account property table, which at least includes an account capacity total quota, wherein the account capacity quota is the total storage amount allocated to an account in the object storage that the account can use.

[0036] As an embodiment, for any existing account, the account capacity total quota in the account is increased or decreased, and the corresponding account capacity total quota will change. For example: Figure 2 As shown in the figure, the total storage amount in the object storage is 100TB, and the user can allocate the total storage amount to account 1, account 2 and account 3, and obtain the capacity quota of account 1, account 2 and account 3 as 20TB, 30TB and 50TB respectively.

[0037] For a newly created account, it is also considered that the account capacity total quota of the newly created account has changed, and the account capacity quota of the newly added account is the target value, at this time the total storage amount represented by the account is not limited.

[0038] The above describes the change of the account capacity quota of the account.

[0039] As an embodiment, for the account whose account capacity total quota has changed, it is also necessary to perform the adjustment of the capacity control identifier of each data bucket associated with the account according to the change of the account capacity total quota as in step 101, and the capacity control identifier is used for storage control. As for how to adjust the capacity control identifier of each data bucket associated with the account according to the change, specific examples will be described below, which will not be described here.

[0040] Step 102, when the data bucket property information of an account associated with a data bucket changes the data bucket total capacity quota from the first data bucket capacity quota to the second data bucket capacity quota, the capacity control identifier of the data bucket is adjusted according to the second data bucket capacity quota.

[0041] In application, the object storage system is usually configured with at least one account property information, and also configured with at least one data bucket property information, such as: the data bucket property information can be a bucket property table, which includes the data bucket capacity total quota and the capacity control identifier of the data bucket.

[0042] In the embodiment, an account is usually configured with at least one data bucket corresponding to the account, the total capacity quota of the account can be composed of the total capacity quotas of the at least one data bucket, and the total capacity quota of each data bucket can be set according to actual conditions, and the total capacity quotas of the data buckets can be the same or different. Figure 2 As shown in the figure, the capacity quota of the account 2 is allocated to five data buckets, which are bucket 1, bucket 2, bucket 3, bucket 4, and bucket 5, and the corresponding capacity quotas are 2 TB, 3 TB, 5 TB, 10 TB, and 10 TB.

[0043] As an example, for any existing data bucket, modifying the total capacity quota of the data bucket will change the total capacity quota of the data bucket, for example, modifying the total capacity quota of the data bucket corresponding to the data bucket from a first data bucket capacity quota to a second data bucket capacity quota, which can increase or decrease the total capacity quota of the data bucket corresponding to the data bucket.

[0044] For a newly added data bucket, a preset total capacity quota of the data bucket is configured, but there is no capacity control identifier corresponding to the data bucket, so the capacity control identifier of the data bucket needs to be updated according to the preset capacity quota. Therefore, creating a new data bucket is also considered as a change in the capacity quota of the data bucket, and the capacity control identifier of the data bucket needs to be updated.

[0045] The above describes an example of a change in the total capacity quota of a data bucket.

[0046] As an example, for a data bucket whose total bucket capacity quota changes from a first data bucket capacity quota to a second data bucket capacity quota, it is also necessary to perform the adjustment of the capacity control identifier of the data bucket according to the second data bucket capacity quota as in step 102. As for how to adjust the capacity control identifier of each data bucket associated with the account according to the second data bucket capacity quota, specific examples will be described below, which will not be described here.

[0047] Whether the account capacity total quota is adjusted or the data bucket capacity total quota is adjusted, it can cause a change in the capacity control identifier of the data bucket, so the capacity control identifier of the data bucket needs to be adjusted adaptively according to the change in the account capacity quota, so as to control the storage of the data bucket through the capacity control identifier.

[0048] In step 103, the amount of storage change in a specified time period is determined according to the operation of causing the amount of storage change performed on a data bucket in the specified time period, whether the current amount of storage of the data bucket exceeds the quota is judged according to the amount of storage change, and the capacity control identifier of the data bucket is adjusted according to the judgment result.

[0049] In the embodiment, the operation causing the change of the storage amount performed on the data bucket is used to change the current stored storage amount of the data bucket, and the operation can be at least one of the operations of uploading, segmented uploading, copying, copying segmenting, deleting, segment merging, and the like in the object storage system.

[0050] The change of the storage amount of the data bucket is exemplarily described above.

[0051] As an embodiment, after the change of the storage amount in the data bucket, the operation causing the change of the storage amount performed on the data bucket in the specified time period is also needed to be performed, the change amount of the storage amount in the specified time period is determined, whether the current storage amount of the data bucket exceeds the quota is determined according to the change amount of the storage amount, and the capacity control identifier of the data bucket is adjusted according to the determination result. As to how to adjust the capacity control identifier of the data bucket, the steps of step 103 will be described in detail below, which will not be described here.

[0052] In the embodiment, the change of the storage amount in the data bucket will update the storage amount corresponding to the data bucket in the storage amount statistical table, and will also cause the change of the capacity control identifier of the data bucket. Therefore, the capacity control identifier in the bucket attribute information needs to be updated according to the change of the storage amount. The storage amount statistical table includes the correspondence between each data bucket and the stored storage amount thereof.

[0053] The operation causing the change of the storage amount performed will cause the change of the stored bucket storage amount corresponding to the data bucket. Therefore, the change amount of the storage amount corresponding to the data bucket can be obtained first, the updated stored bucket storage amount is obtained by adding the change amount of the storage amount to the stored bucket storage amount corresponding to the data bucket, the determination result is obtained by judging whether the stored amount of the data bucket and the account stored storage amount of the account associated with the data bucket exceed the quota, and then the capacity control identifier of the data bucket is adjusted according to the determination result.

[0054] By applying the embodiment, the change of the account capacity total quota of the account, the change of the data bucket capacity total quota of the data bucket, or the change of the storage amount of the data bucket caused by the operation causing the change of the storage amount performed will automatically adjust the capacity control identifier for identifying the storage control in the data bucket, so as to control the storage according to the capacity control identifier. Without comparing whether the capacity quota is exceeded for multiple times when the object is stored, the system overhead is reduced. After the operation causing the change of the storage amount performed on the data bucket in the specified time period is completed, the storage amount statistical table is updated synchronously, the frequent updating of the storage amount statistical table is avoided, and the performance of the business operation is improved.

[0055] After completion Figure 1 Following the illustrated process, as an example, step 101, adjusting the capacity control flags of each data bucket associated with the account based on the second account capacity quota, includes:

[0056] Step a1: When the second account capacity quota is not the target value, if the account capacity quota already used by the account is greater than or equal to the second account capacity quota, then adjust the capacity control flag of each data bucket associated with the account to the first value; otherwise, for each data bucket associated with the account, if the data bucket capacity quota already used by the data bucket is less than the total data bucket capacity quota of the data bucket, then adjust the capacity control flag of the data bucket to the second value; if the data bucket capacity quota already used by the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, then adjust the capacity control flag of the data bucket to the first value.

[0057] In this embodiment, by determining whether the second account capacity quota is the target value, the system controls whether the data buckets associated with the account are prohibited from storing data. For example, as an embodiment, step a1.

[0058] As another embodiment, when the second account capacity quota is the target value, the data bucket associated with the account continues to be used for data storage. For example, in step a2, when the second account capacity quota is the target value, for each data bucket associated with the account, if the used data bucket capacity quota of the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, the capacity control flag of the data bucket is adjusted to the first value; otherwise, the capacity control flag of the data bucket is adjusted to the second value.

[0059] In this embodiment, the first value is used to indicate that the data bucket is currently prohibited from being used for data storage, and the second value is used to indicate that the data bucket is currently allowed to be used for data storage. Here, the first value and the second value can be set according to actual needs, as long as the first value and the second value are different. For example, the first value can be set to 0 and the second value can be set to 1; or the first value can be set to 1 and the second value can be set to 0. This embodiment does not specifically limit this.

[0060] In this embodiment, after determining the capacity control flag of the data bucket, it is also necessary to control data storage according to the capacity control flag of the data bucket. As an example, when the capacity control flag of the data bucket is a first value, data storage in the data bucket is prohibited, while when the capacity control flag of the data bucket is a second value, data storage in the data bucket is allowed.

[0061] It should be noted that the above target value is used to indicate that there is no limit to the total amount of storage. The above target value can be set according to actual needs. For example, the target value can be set to 0 or 1. This embodiment is not limited to this.

[0062] In the embodiment, when the capacity control identifier of the data bucket is adjusted, if the capacity control identifier of the data bucket does not change, no adjustment is needed, and only the capacity control identifier of the data bucket that changes is updated.

[0063] After the flow shown in the figure is completed, as an embodiment, adjusting the capacity control identifier of the second data bucket according to the second data bucket capacity quota in step 102 includes steps b1-step b2: Figure 1

[0064] Step b1, when the account capacity total quota of the account is the third account capacity quota and the second data bucket capacity quota is not the target value, if the used account capacity quota of the account associated with the data bucket is greater than or equal to the third account capacity quota, the capacity control identifier of the data bucket is adjusted to the first value, otherwise, when the used data bucket capacity quota of the data bucket is less than the second data bucket capacity quota of the data bucket, the capacity control identifier of the data bucket is adjusted to the second value, and when the used data bucket capacity quota of the data bucket is greater than or equal to the second data bucket capacity quota of the data bucket, it is determined that the capacity control identifier of the data bucket is the first value.

[0065] It should be noted that when the total data bucket capacity quota changes from the first data bucket capacity quota to the second data bucket capacity quota, the total data bucket capacity quota of the data bucket changes, and the capacity control identifier corresponding to the data bucket needs to be updated.

[0066] In the embodiment, the account capacity total quota of the account associated with the data bucket is obtained first, such as the third account capacity quota, which can be the modified account capacity total quota at the last time of updating the capacity control identifier of the data bucket, i.e., the second account capacity quota, or the unmodified account capacity total quota, as long as it can identify the maximum storage amount of the current account for storage, the third capacity quota, which is not specifically limited in the embodiment.

[0067] In the embodiment, by judging whether the second data bucket capacity quota is the target value, whether the used data bucket quota of the data bucket will exceed the total data bucket capacity quota corresponding to the data bucket is determined, such as when the second data bucket capacity quota is not the target value, the total amount of storage of the data bucket will be limited by the total data bucket capacity quota, therefore, when the capacity control identifier of the data bucket is updated when the second data bucket capacity quota is not the target value, the size relationship between the second data bucket capacity quota of the data bucket and the used data bucket capacity total quota needs to be determined to determine the corresponding capacity control identifier, such as step b1.

[0068] ​As another embodiment, when the total account capacity quota of an account is the third account capacity quota and the second data bucket capacity quota is the target value, the capacity control flag of the data bucket is adjusted using the following step b2.

[0069] It should be noted that when the second data bucket capacity quota is the target value, the storage capacity of this data bucket is not limited by the total data bucket capacity quota. The used data bucket capacity quota of this data bucket will not exceed the total data bucket capacity quota. Therefore, when the second data bucket capacity quota is the target value, it can be identified that the used data bucket capacity quota of this data bucket has not exceeded the total data bucket capacity quota. When updating the capacity control flag of this data bucket, it is only necessary to compare whether the used account capacity quota of the account associated with the data bucket exceeds the second account capacity quota. In one embodiment, for example, step b2.

[0070] Step b2: When the total account capacity quota of an account is the third account capacity quota and the second data bucket capacity quota is the target value, if the used account capacity quota of the account associated with the data bucket is greater than or equal to the second account capacity quota, adjust the capacity control flag of the data bucket to the first value; otherwise, adjust the capacity control flag of the data bucket to the second value.

[0071] After completion Figure 1 Following the illustrated process, as an example, step 103, adjusting the capacity control flag of the data bucket based on the judgment result, includes:

[0072] If the judgment result is that the quota is exceeded, the capacity control flag of the data bucket is adjusted to the first value, which indicates that the data bucket is currently prohibited from being used for data storage; if the judgment result is that the quota is not exceeded, the capacity control flag of the data bucket is adjusted to the second value, which indicates that the data bucket is currently allowed to be used for data storage.

[0073] In this embodiment, the storage change is determined based on the operations performed on a data bucket within a specified time period that cause changes in storage volume, and the corresponding capacity control flag is updated accordingly. Instead of updating the storage volume statistics table immediately after an operation that causes a change in storage volume is completed, the storage volume statistics table is updated synchronously only after all operations within the specified time period are completed. Therefore, when the business access volume is high, the number of updates to the storage volume statistics table can be reduced, the system resource overhead can be reduced, and the overall read and write performance of objects can be improved.

[0074] The updating method of the capacity control identifier of the data bucket is described in detail above. The updating method of the capacity control identifier of the data bucket is described in another way below. For example, the capacity control identifier of the data bucket is used to identify the state of whether the data bucket and the account exceed the quota. The state of whether the data bucket and the account exceed the quota can be determined by obtaining the current capacity control identifier of the data bucket. Therefore, after the total quota of the account capacity or the total quota of the data bucket capacity changes, the state of the data bucket can be obtained by the capacity control identifier of the data bucket. For example, in step 101, the capacity control identifier of each data bucket associated with the account is adjusted according to the second account capacity quota, including:

[0075] When the used account capacity quota of the account is greater than or equal to the second account capacity quota, if the current capacity control identifier of the data bucket associated with the account is the third value, the capacity control identifier of the data bucket is adjusted from the third value to the fifth value; if the current capacity control identifier of the data bucket associated with the account is the fourth value, the capacity control identifier of the data bucket is adjusted from the fourth value to the sixth value.

[0076] When the used account capacity quota of the account is less than the second account capacity quota of the account, if the current capacity control identifier of the data bucket associated with the account is the fifth value, the capacity control identifier of the data bucket is adjusted from the fifth value to the third value; if the current capacity control identifier of the data bucket associated with the account is the sixth value, the capacity control identifier of the data bucket is adjusted from the sixth value to the fourth value.

[0077] In this embodiment, the third value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total quota of the bucket capacity. The fourth value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota exceeds the total quota of the bucket capacity. The fifth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota does not exceed the total quota of the bucket capacity. The sixth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota exceeds the total quota of the bucket capacity.

[0078] It should be noted that the third value, the fourth value, the fifth value and the sixth value can be set according to actual conditions. In order to distinguish different states of whether the account and the data bucket exceed the corresponding capacity quota, the third value, the fourth value, the fifth value and the sixth value can be set as different values. In this embodiment, they are not specifically limited.

[0079] In this embodiment, when adjusting the capacity control flags of each data bucket, only the capacity control flags of data buckets that have changed are adjusted; the capacity control flags of data buckets that have not changed are not updated, thereby reducing system overhead. Furthermore, when an account's capacity quota changes, the data buckets that need updating and the updated capacity control flags are determined by the data bucket capacity control flags. This eliminates the need to compare the data bucket capacity quota of each data bucket with the already used data bucket capacity quota to determine whether the data bucket is currently being used for data storage, thus reducing system overhead.

[0080] The above describes how to update the capacity control identifier of a data bucket when the total capacity quota of an account changes. The following describes the specific steps for updating the capacity control identifier of a data bucket when the total capacity quota of the data bucket changes.

[0081] In this embodiment, the current capacity control flag of the data bucket indicates whether the data bucket is over-limited and whether the account associated with the data bucket is over-limited. The capacity control flag indicates whether the data bucket is currently permitted for data storage. When the total capacity quota of the data bucket changes, it only affects whether the data bucket is over-limited; it does not change the status of the account associated with the data bucket. Therefore, it is only necessary to determine whether the used capacity quota of the data bucket exceeds the second data bucket capacity quota to update the capacity control flag of the data bucket. Step 102 below describes how to adjust the capacity control flag of the data bucket.

[0082] After completion Figure 1 Following the illustrated process, as an example, step 102, adjusting the capacity control flag of the data bucket according to the second data bucket capacity quota, includes:

[0083] Step c1: When the data bucket capacity quota already used is greater than or equal to the second data bucket capacity quota of the data bucket, if the current capacity control flag of the data bucket is the fifth value, adjust the capacity control flag of the data bucket from the fifth value to the sixth value; if the current capacity control flag of the data bucket is the third value, adjust the capacity control flag of the data bucket from the third value to the fourth value.

[0084] In this embodiment, if the current capacity control flag of the data bucket is the third or fifth value, the used bucket capacity quota in the data bucket has not exceeded the total bucket capacity quota. However, if the data bucket capacity quota of the data bucket changes, it is necessary to determine whether the used data bucket capacity quota of the data bucket exceeds the second data bucket capacity quota of the data bucket in order to adjust the capacity control flag of the data bucket.

[0085] In an embodiment, the capacity control identifier of the data bucket is adjusted from the fifth value to the sixth value, and the capacity control identifier of the data bucket is adjusted from the third value to the fourth value, so as to update the data bucket from the non-over-quotas state to the data bucket over-quotas state, while the account over-quotas state does not change.

[0086] It should be noted that when the used data bucket capacity quota of the data bucket is greater than or equal to the second data bucket capacity quota of the data bucket, the capacity control identifier of the data bucket is the fourth value or the sixth value, and neither the data bucket over-quotas state nor the account over-quotas state changes. Therefore, the capacity control identifier of the data bucket with the fourth value or the sixth value needs to be updated.

[0087] The above step c1 is the updating process of the capacity control identifier of the data bucket when the used data bucket capacity quota of the data bucket is not over-quotas and changes to the used data bucket capacity quota of the data bucket being greater than or equal to the second data bucket capacity quota of the data bucket. The updating process of the capacity control identifier of the data bucket when the used data bucket capacity quota of the data bucket is over-quotas and changes to the used data bucket capacity quota of the data bucket being less than the second data bucket capacity quota of the data bucket is described below through step c2.

[0088] In step c2, when the used data bucket capacity quota of the data bucket is less than the second data bucket capacity quota of the data bucket, if the current capacity control identifier of the data bucket is the sixth value, the capacity control identifier of the data bucket is adjusted from the sixth value to the fifth value; if the current capacity control identifier of the data bucket is the fourth value, the capacity control identifier of the data bucket is adjusted from the fourth value to the third value.

[0089] It should be noted that when the current capacity control identifier of the data bucket is the sixth value or the fifth value, the data bucket exceeds the corresponding quota and the account does not exceed the corresponding quota, and the data bucket capacity quota of the data bucket changes, it is necessary to determine whether the used data bucket capacity quota of the data bucket exceeds the second data bucket capacity quota of the data bucket to adjust the capacity control identifier of the data bucket.

[0090] In an embodiment, the capacity control identifier of the data bucket is adjusted from the sixth value to the fifth value or the capacity control identifier of the data bucket is adjusted from the fourth value to the third value, so as to update the data bucket from the over-quotas state to the data bucket non-over-quotas state, while the account over-quotas state does not change.

[0091] In the embodiment, the specific content of the third value, the fourth value, the fifth value and the sixth value can be referred to the above step 101.

[0092] In the embodiment, when the bucket capacity quota changes, only the capacity control identifier of the data bucket whose capacity quota changes is updated, and the data bucket that needs to be updated and the updated capacity control identifier are determined through the capacity control identifier of the data bucket, and it is not necessary to compare the account capacity quota of the account with the data bucket capacity quota that has been used by the account to determine whether the data bucket currently allows storage, thereby reducing system overhead.

[0093] The specific steps of updating the capacity control identifier of the data bucket when the total capacity quota of the data bucket changes are described above. The adjustment manner of the capacity control identifier of the data bucket when the used capacity quota of the data bucket changes is specifically described below through step 103.

[0094] After the flow shown in FIG. 1 is completed, Figure 1 As an embodiment, adjusting the capacity control identifier of the data bucket according to the judgment result in step 103 includes:

[0095] When the judgment result is exceeding the quota, if the current capacity control identifier of the data bucket is the fifth value, the capacity control identifier of the data bucket is adjusted from the fifth value to the sixth value; if the current capacity control identifier of the data bucket is the third value, the capacity control identifier of the data bucket is adjusted from the third value to the fourth value.

[0096] When the judgment result is not exceeding the quota, the capacity control identifier of the data bucket is unchanged.

[0097] It should be noted that when the judgment result is exceeding the quota, it indicates that the used account capacity quota of the account associated with the data bucket does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota, and when the judgment result is not exceeding the quota, it indicates that the used account capacity quota of the account exceeds the total account capacity quota and the used bucket capacity quota exceeds the total bucket capacity quota.

[0098] In the embodiment, the specific content of the third value, the fourth value, the fifth value and the sixth value can be referred to the step 101 described above.

[0099] In the embodiment, when data storage is performed in the target data bucket, only the capacity control identifier of the target data bucket is needed to determine whether the target data bucket currently continues data storage through the capacity control identifier, and therefore, it is not necessary to determine whether data storage can be performed through multiple comparisons to determine whether the quota capacity is exceeded when object storage is performed, thereby reducing system overhead.

[0100] In step 103, when determining the capacity control identifier of the data bucket, the storage amount change of the data bucket needs to be determined first. As an embodiment, the storage amount change can be obtained by the following method: after the operation causing the storage amount change is executed for a data bucket in a specified time period, the storage amount change of the data bucket in the specified time period is obtained from the memory.

[0101] It should be noted that at the start time of the specified time period, the storage amount change of a data bucket stored in the memory is 0. In the specified time period, the storage amount in the memory is updated according to the operation causing the storage amount change. At the end time of the specified time period, the storage amount change of the data bucket in the specified time period is obtained. Therefore, the storage amount statistics table is updated by the storage amount change in the specified time period.

[0102] As an embodiment, as shown in FIG. 6, after the storage amount change is updated to the storage amount statistics table and the update timestamp is recorded, steps 104-106 are executed. Figure 3

[0103] In this embodiment, the storage amount change is stored in the memory. When the device is in an abnormal power-off state, the data stored in the memory will be lost. Therefore, the storage amount change cannot be obtained from the memory, which leads to the fact that the storage amount statistics table and the capacity control identifier corresponding to the data bucket cannot be updated. After the abnormal power-off, the storage amount statistics table and the capacity control identifier corresponding to the data bucket are updated by steps 104-106.

[0104] Step 104: When recovering from the abnormal power-off state to the normal state, the update timestamp of the storage amount statistics table closest to the current time before the abnormal power-off state is queried.

[0105] In this embodiment, when the storage amount statistics table is updated, the update timestamp corresponding to the update of the storage amount statistics table is recorded. Therefore, the latest update timestamp of the storage amount statistics table before the abnormal power-off can be queried. Due to the abnormal power-off, the storage amount statistics table and the capacity control identifier corresponding to the data bucket after the latest update timestamp of the storage amount statistics table are not updated.

[0106] Step 105: According to the update timestamp, the storage amount change of each data bucket associated with the account is determined.

[0107] In this embodiment, in step 105, the storage amount change of each data bucket associated with the account is determined according to the update timestamp, which includes:

[0108] ​According to the modification time of the object in the object metadata table, the object size stored in each data bucket after the update timestamp is queried from the object metadata table, and the object size deleted in each data bucket after the update timestamp is obtained from the deletion log, and the object metadata table comprises: the modification time of the object, the data bucket corresponding to the object, and the size of the object.

[0109] According to the object size deleted in each data bucket and the object size stored, the storage amount change of each data bucket associated with the account is determined.

[0110] In the deletion log, the deletion time, object size, object upload time, and data bucket corresponding to object storage of the object are recorded, so that the related information of the upload and deletion of the object can be obtained from the object metadata table and the deletion log, and the storage amount change in the specified time period is obtained.

[0111] Step 106, updating the storage amount change of each data bucket to the storage amount statistical table and adjusting the capacity control identifier of each data bucket.

[0112] In the application, the storage amount statistical table is used to identify the storage amount change of each data bucket and the corresponding update timestamp, and in this embodiment, the change state of the storage amount of the data bucket in the specified time period can be obtained from the storage amount statistical table.

[0113] In this embodiment, the capacity control identifier of each data bucket is stored in the data bucket attribute information after the update is completed, so that the capacity control identifier of the data bucket can be queried through the data bucket attribute information.

[0114] The way of adjusting the capacity control identifier of each data bucket in this embodiment is consistent with the way of step 103, and can be referred to step 103.

[0115] In the application embodiment, when the total quota of the account capacity of the account changes, the total quota of the data bucket capacity of the data bucket changes, or the storage amount of the data bucket changes caused by the operation performed, the capacity control identifier for identifying the storage control in the data bucket is automatically adjusted according to the above changes, so that the storage control is controlled according to the capacity control identifier, without comparing multiple times to determine whether the quota capacity is exceeded when the object is stored, reducing system overhead, and after the operation performed in the specified time period for a data bucket is completed, the storage amount statistical table is updated synchronously, avoiding frequent updating of the storage amount statistical table, thereby improving the performance of the business operation.

[0116] Corresponding to the foregoing embodiment of the storage control method applied to the object storage system, the application also provides an embodiment of a storage control device applied to the object storage system.

[0117] AsFigure 4 As shown, the present application provides a storage control device 400 applied to an object storage system, the device comprising:

[0118] The first adjusting module 401 is configured to adjust the capacity control identifier of each data bucket associated with an account in the object storage system according to a second account capacity quota when the total account capacity quota of the account in the account attribute information of the object storage system changes from a first account capacity quota to the second account capacity quota, wherein the capacity control identifier is used for storage control;

[0119] The second adjusting module 402 is configured to adjust the capacity control identifier of a data bucket according to a second data bucket capacity quota when the total data bucket capacity quota of the data bucket in the data bucket attribute information associated with an account changes from a first data bucket capacity quota to the second data bucket capacity quota;

[0120] The third adjusting module 403 is configured to determine the storage amount change in a specified time period according to the operations performed on a data bucket in the specified time period that cause the storage amount to change, and adjust the capacity control identifier of the data bucket according to whether the current storage amount of the data bucket exceeds the quota according to the storage amount change.

[0121] As an embodiment, the first adjusting module is specifically configured to:

[0122] When the second account capacity quota is not the target value, if the used account capacity quota of the account is greater than or equal to the second account capacity quota, the capacity control identifier of each data bucket associated with the account is adjusted to a first value; otherwise, for each data bucket associated with the account, if the used data bucket capacity quota of the data bucket is less than the total data bucket capacity quota of the data bucket, the capacity control identifier of the data bucket is adjusted to a second value, and if the used data bucket capacity quota of the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, the capacity control identifier of the data bucket is adjusted to the first value, wherein the first value is used to identify that the data bucket is currently prohibited from being used for data storage, and the second value is used to identify that the data bucket is currently allowed to be used for data storage;

[0123] When the second account capacity quota is the target value, for each data bucket associated with the account, if the used data bucket capacity quota of the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, the capacity control identifier of the data bucket is adjusted to the first value, otherwise, the capacity control identifier of the data bucket is adjusted to the second value.

[0124] As an embodiment, the second adjusting module is specifically configured to:

[0125] When the total account capacity quota of the account is the third account capacity quota and the second data bucket capacity quota is the target value, if the used account capacity quota of the account associated with the data bucket is greater than or equal to the second account capacity quota, the capacity control identifier of the data bucket is adjusted to the first value, otherwise, the capacity control identifier of the data bucket is adjusted to the second value.

[0126] When the total account capacity quota of the account is the third account capacity quota and the second data bucket capacity quota is the target value, if the used account capacity quota of the account associated with the data bucket is greater than or equal to the second account capacity quota, the capacity control identifier of the data bucket is adjusted to the first value, otherwise, the capacity control identifier of the data bucket is adjusted to the second value.

[0127] As an embodiment, the third adjusting module is specifically configured to:

[0128] When the judgment result is that the quota is exceeded, the capacity control identifier of the data bucket is adjusted to the first value, and the first value is used to identify that the data bucket is currently prohibited from being used for data storage.

[0129] When the judgment result is that the quota is not exceeded, the capacity control identifier of the data bucket is adjusted to the second value, and the second value is used to identify that the data bucket is currently allowed to be used for data storage.

[0130] As an embodiment, the first adjusting module is specifically configured to:

[0131] When the used account capacity quota of the account is greater than or equal to the second account capacity quota, if the current capacity control identifier of the data bucket associated with the account is the third value, the capacity control identifier of the data bucket is adjusted from the third value to the fifth value; if the current capacity control identifier of the data bucket associated with the account is the fourth value, the capacity control identifier of the data bucket is adjusted from the fourth value to the sixth value, the third value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota, the fourth value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota, the fifth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota does not exceed the total bucket capacity quota; and the sixth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota.

[0132] When the used account capacity quota of the account is less than the second account capacity quota of the account, if the current capacity control identifier of the data bucket associated with the account is the fifth value, adjusting the capacity control identifier of the data bucket from the fifth value to the third value; if the current capacity control identifier of the data bucket associated with the account is the sixth value, adjusting the capacity control identifier of the data bucket from the sixth value to the fourth value.

[0133] As an embodiment, the second adjusting module is specifically configured to:

[0134] When the used data bucket capacity quota of the data bucket is greater than or equal to the second data bucket capacity quota of the data bucket, if the current capacity control identifier of the data bucket is the fifth value, adjusting the capacity control identifier of the data bucket from the fifth value to the sixth value; if the current capacity control identifier of the data bucket is the third value, adjusting the capacity control identifier of the data bucket from the third value to the fourth value, the third value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota, the fourth value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota, the fifth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota does not exceed the total bucket capacity quota; and the sixth value is used to identify that the used account capacity quota of the account exceeds the second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota.

[0135] When the used data bucket capacity quota of the data bucket is less than the second data bucket capacity quota of the data bucket, if the current capacity control identifier of the data bucket is the sixth value, adjusting the capacity control identifier of the data bucket from the sixth value to the fifth value; if the current capacity control identifier of the data bucket is the fourth value, adjusting the capacity control identifier of the data bucket from the fourth value to the third value.

[0136] As an embodiment, the third adjusting module is specifically configured to:

[0137] When the determination result is that the quota is exceeded, if the current capacity control identifier of the data bucket is the fifth value, the capacity control identifier of the data bucket is adjusted from the fifth value to a sixth value; if the current capacity control identifier of the data bucket is a third value, the capacity control identifier of the data bucket is adjusted from the third value to a fourth value, the third value is used to identify that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota, the fourth value is used to identify that the used account capacity quota of the account does not exceed the second account total capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota, the fifth value is used to identify that the used account capacity quota of the account exceeds the second account total capacity quota and the used data bucket capacity quota does not exceed the total bucket capacity quota; the sixth value is used to identify that the used account capacity quota of the account exceeds the second account total capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota.

[0138] When the determination result is that the quota is not exceeded, the capacity control identifier of the data bucket is unchanged.

[0139] As an embodiment, the apparatus further comprises:

[0140] The query module is configured to query an update timestamp of the storage amount statistical table closest to a current time before the device recovers from the abnormal power-off state to normal.

[0141] The determination module is configured to determine the storage amount change of each data bucket associated with the account according to the update timestamp.

[0142] The update module is configured to update the storage amount change of each data bucket to the storage amount statistical table and adjust the capacity control identifier of each data bucket.

[0143] As an embodiment, the determination module is specifically configured to:

[0144] According to the modification time of the object in the object metadata table, the object size stored in each data bucket after the update timestamp is queried from the object metadata table, and the object size deleted by each data bucket after the update timestamp is obtained from the deletion log, the object metadata table comprising: the modification time of the object, the data bucket corresponding to the object and the size of the object;

[0145] According to the object size deleted by each data bucket and the object size stored, the storage amount change of each data bucket associated with the account is determined.

[0146] According to the embodiments of the present application, when the account capacity quota of an account changes, the data bucket capacity quota of a data bucket changes, or the storage capacity of a data bucket changes due to an operation performed, the capacity control identifier used to identify the storage control in the data bucket is automatically adjusted according to the changes, so that the storage control is controlled according to the capacity control identifier, without comparing whether the capacity quota is exceeded multiple times when the object is stored, reducing system overhead, and after the operation performed on the data bucket within a specified time period and causing the storage capacity to change is completed, the storage capacity statistics table is updated synchronously, avoiding frequent updating of the storage capacity statistics table, thereby improving the performance of business operations.

[0147] The electronic device provided by the embodiments of the present application, from the hardware layer, the hardware architecture schematic diagram can refer to Figure 5 The electronic device provided by the embodiments of the present application, from the hardware layer, the hardware architecture schematic diagram can refer to

[0148] The machine readable storage medium provided by the embodiments of the present application stores machine executable instructions, and when the machine executable instructions are called and executed by the processor, the machine executable instructions cause the processor to implement the storage control operation applied to the object storage system disclosed in the above examples.

[0149] Here, the machine readable storage medium can be any electronic, magnetic, optical or other physical storage device, and can contain or store information such as executable instructions, data, etc. For example, the machine readable storage medium can be RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard drive), solid state disk, any type of storage disk (such as optical disk, dvd, etc.), or similar storage medium, or combination thereof.

[0150] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product having certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0151] For the convenience of description, the above apparatus is described in various units by function for separate description. Of course, the functions of the units can be implemented in one or more software and / or hardware in implementing the present application.

[0152] Those skilled in the art should understand that embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0154] Moreover, these computer program instructions can also be stored in a computer-readable memory capable of directing the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0156] For the apparatus embodiments, since they basically correspond to the method embodiments, the relevant parts can be seen from the parts of the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected to achieve the purposes of the present application according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0157] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0158] It should be understood that the present specification is not intended to be limited to the precise structures described in the specification and shown in the drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the present specification. The scope of the present specification is to be indicated only by the appended claims.

[0159] The above description is merely illustrative of the embodiments of the present specification and is not intended to limit the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the present specification.

Claims

1. A storage control method applied to an object storage system, characterized in that, The method includes: In the object storage system, the total account capacity quota of an account changes from a first account capacity quota to a second account capacity quota in the configured account attribute information. The capacity control identifier of each data bucket associated with the account is adjusted according to the second account capacity quota, wherein the capacity control identifier is used for storage control. In the data bucket attribute information associated with an account, the total data bucket capacity quota of a data bucket changes from the first data bucket capacity quota to the second data bucket capacity quota, and the capacity control flag of the data bucket is adjusted according to the second data bucket capacity quota; Based on the operations performed on a data bucket within a specified time period that cause changes in storage volume, determine the amount of storage volume change within the specified time period, determine whether the current storage volume of the data bucket exceeds the quota based on the amount of storage volume change, and adjust the capacity control flag of the data bucket based on the determination result. The step of adjusting the capacity control identifiers of each data bucket associated with the account according to the second account capacity quota includes: When the used account capacity quota of the account is greater than or equal to the second account capacity quota, if the current capacity control flag of the data bucket associated with the account is a third value, the capacity control flag of the data bucket is adjusted from the third value to a fifth value; if the current capacity control flag of the data bucket associated with the account is a fourth value, the capacity control flag of the data bucket is adjusted from the fourth value to a sixth value. The third value is used to indicate that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota; the fourth value is used to indicate that the used account capacity quota of the account does not exceed the total second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota; the fifth value is used to indicate that the used account capacity quota of the account exceeds the total second account capacity quota and the used bucket capacity quota does not exceed the total bucket capacity quota; the sixth value is used to indicate that the used account capacity quota of the account exceeds the total second account capacity quota and the used bucket capacity quota exceeds the total bucket capacity quota. When the account capacity quota already used by the account is less than the second account capacity quota of the account, if the current capacity control identifier of the data bucket associated with the account is the fifth value, the capacity control identifier of the data bucket is adjusted from the fifth value to the third value; if the current capacity control identifier of the data bucket associated with the account is the sixth value, the capacity control identifier of the data bucket is adjusted from the sixth value to the fourth value.

2. The method according to claim 1, characterized in that, The step of adjusting the capacity control flags of each data bucket associated with the account according to the second account capacity quota includes: When the second account capacity quota is not the target value, if the account capacity quota already used by the account is greater than or equal to the second account capacity quota, then the capacity control flag of each data bucket associated with the account is adjusted to the first value; otherwise, for each data bucket associated with the account, if the data bucket capacity quota already used by the data bucket is less than the total data bucket capacity quota of the data bucket, then the capacity control flag of the data bucket is adjusted to the second value; if the data bucket capacity quota already used by the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, then the capacity control flag of the data bucket is adjusted to the first value. The first value is used to indicate that the data bucket is currently prohibited from being used for data storage, and the second value is used to indicate that the data bucket is currently allowed to be used for data storage. When the second account capacity quota is the target value, for each data bucket associated with the account, if the used data bucket capacity quota of the data bucket is greater than or equal to the total data bucket capacity quota of the data bucket, then the capacity control flag of the data bucket is adjusted to the first value; otherwise, the capacity control flag of the data bucket is adjusted to the second value.

3. The method according to claim 1, characterized in that, The process of adjusting the capacity control flag of a data bucket based on the second data bucket capacity quota, where the total data bucket capacity quota of a data bucket in the data bucket attribute information associated with an account changes from the first data bucket capacity quota to the second data bucket capacity quota, includes: When the total account capacity quota of the account is the third account capacity quota and the second data bucket capacity quota is not the target value, if the account capacity quota already used by the account associated with the data bucket is greater than or equal to the third account capacity quota, then the capacity control flag of the data bucket is adjusted to the first value; otherwise, when the data bucket capacity quota already used by the data bucket is less than the second data bucket capacity quota of the data bucket, the capacity control flag of the data bucket is adjusted to the second value; when the data bucket capacity quota already used by the data bucket is greater than or equal to the second data bucket capacity quota of the data bucket, the capacity control flag of the data bucket is determined to be the first value. The first value is used to indicate that the data bucket is currently prohibited from being used for data storage, and the second value is used to indicate that the data bucket is currently allowed to be used for data storage. When the total account capacity quota of the account is the third account capacity quota and the second data bucket capacity quota is the target value, if the used account capacity quota of the account associated with the data bucket is greater than or equal to the second account capacity quota, the capacity control flag of the data bucket is adjusted to the first value; otherwise, the capacity control flag of the data bucket is adjusted to the second value.

4. The method according to claim 1, characterized in that, The step of adjusting the capacity control flag of the data bucket based on the judgment result includes: If the judgment result is that the quota is exceeded, the capacity control flag of the data bucket is adjusted to the first value, which is used to indicate that the data bucket is currently prohibited from being used for data storage. If the determination result is that the quota has not been exceeded, the capacity control flag of the data bucket is adjusted to the second value, which is used to indicate that the data bucket is currently allowed to be used for data storage.

5. The method according to claim 1, characterized in that, The process of adjusting the capacity control flag of a data bucket based on the second data bucket capacity quota, where the total data bucket capacity quota of a data bucket in the data bucket attribute information associated with an account changes from the first data bucket capacity quota to the second data bucket capacity quota, includes: When the used capacity quota of a data bucket is greater than or equal to the second data bucket capacity quota of the data bucket, if the current capacity control flag of the data bucket is the fifth value, the capacity control flag of the data bucket is adjusted from the fifth value to the sixth value; if the current capacity control flag of the data bucket is the third value, the capacity control flag of the data bucket is adjusted from the third value to the fourth value. The third value is used to indicate that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota. The fourth value is used to indicate that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota. The fifth value is used to indicate that the used account capacity quota of the account exceeds the second account capacity quota and the used bucket capacity quota does not exceed the total bucket capacity quota. The sixth value is used to indicate that the used account capacity quota of the account exceeds the second account capacity quota and the used bucket capacity quota exceeds the total bucket capacity quota. When the used bucket capacity quota of the data bucket is less than the second data bucket capacity quota of the data bucket, if the current capacity control identifier of the data bucket is the sixth value, the capacity control identifier of the data bucket is adjusted from the sixth value to the fifth value; if the current capacity control identifier of the data bucket is the fourth value, the capacity control identifier of the data bucket is adjusted from the fourth value to the third value.

6. The method according to claim 1, characterized in that, The step of adjusting the capacity control flag of the data bucket based on the judgment result includes: When the determination result is that the quota is exceeded, if the current capacity control flag of the data bucket is the fifth value, the capacity control flag of the data bucket is adjusted from the fifth value to the sixth value; if the current capacity control flag of the data bucket is the third value, the capacity control flag of the data bucket is adjusted from the third value to the fourth value. The third value is used to indicate that the account capacity quota used by the account does not exceed the second account capacity quota and the data bucket capacity quota used by the data bucket does not exceed the total bucket capacity quota. The fourth value is used to indicate that the account capacity quota used by the account does not exceed the second account total capacity quota and the data bucket capacity quota used exceeds the total bucket capacity quota. The fifth value is used to indicate that the account capacity quota used by the account exceeds the second account total capacity quota and the bucket capacity quota used does not exceed the total bucket capacity quota. The sixth value is used to indicate that the account capacity quota used by the account exceeds the second account total capacity quota and the bucket capacity quota used exceeds the total bucket capacity quota. If the judgment result is that the quota has not been exceeded, the capacity control flag of the data bucket remains unchanged.

7. The method according to claim 6, characterized in that, The method further includes: When the system recovers from an abnormal power outage, query the most recent update timestamp of the storage statistics table before the abnormal power outage. The change in storage volume of each data bucket associated with the account is determined based on the update timestamp; Update the storage changes of each data bucket to the storage statistics table and adjust the capacity control flags of each data bucket.

8. The method according to claim 7, characterized in that, The step of determining the storage change of each data bucket associated with the account based on the update timestamp includes: Based on the modification time of the object in the object metadata table, the size of the object stored in each data bucket after the update timestamp is queried from the object metadata table, and the size of the object deleted in each data bucket after the update timestamp is obtained from the deletion log. The object metadata table includes: the modification time of the object, the data bucket corresponding to the object, and the size of the object. The change in storage size for each data bucket associated with the account is determined based on the size of the objects deleted and stored in each data bucket.

9. A storage control device applied in an object storage system, characterized in that, The device includes: The first adjustment module is used to change the total account capacity quota of an account in the account attribute information configured in the object storage system from a first account capacity quota to a second account capacity quota, and adjust the capacity control identifier of each data bucket associated with the account according to the second account capacity quota, wherein the capacity control identifier is used for storage control; The second adjustment module is used to adjust the capacity control identifier of a data bucket based on the change of the total data bucket capacity quota of a data bucket in the data bucket attribute information associated with an account from the first data bucket capacity quota to the second data bucket capacity quota. The third adjustment module is used to determine the amount of storage change within a specified time period based on the operations performed on a data bucket that cause changes in storage volume within a specified time period, determine whether the current storage volume of the data bucket exceeds the quota based on the amount of storage change, and adjust the capacity control flag of the data bucket based on the determination result. The step of adjusting the capacity control identifiers of each data bucket associated with the account according to the second account capacity quota includes: When the used account capacity quota of the account is greater than or equal to the second account capacity quota, if the current capacity control flag of the data bucket associated with the account is a third value, the capacity control flag of the data bucket is adjusted from the third value to a fifth value; if the current capacity control flag of the data bucket associated with the account is a fourth value, the capacity control flag of the data bucket is adjusted from the fourth value to a sixth value. The third value is used to indicate that the used account capacity quota of the account does not exceed the second account capacity quota and the used data bucket capacity quota of the data bucket does not exceed the total bucket capacity quota; the fourth value is used to indicate that the used account capacity quota of the account does not exceed the total second account capacity quota and the used data bucket capacity quota exceeds the total bucket capacity quota; the fifth value is used to indicate that the used account capacity quota of the account exceeds the total second account capacity quota and the used bucket capacity quota does not exceed the total bucket capacity quota; the sixth value is used to indicate that the used account capacity quota of the account exceeds the total second account capacity quota and the used bucket capacity quota exceeds the total bucket capacity quota. When the account capacity quota already used by the account is less than the second account capacity quota of the account, if the current capacity control identifier of the data bucket associated with the account is the fifth value, the capacity control identifier of the data bucket is adjusted from the fifth value to the third value; if the current capacity control identifier of the data bucket associated with the account is the sixth value, the capacity control identifier of the data bucket is adjusted from the sixth value to the fourth value.

Citation Information

Patent Citations

  • Distributed file system file number quota query, setting and verification method and medium

    CN112181932A

  • Object Storage System with Access Control Quota Status Check

    US20200159452A1