Data writing method and device, electronic equipment and medium
By pre-allocating directory quota capacity when the directory quota usage is less than the threshold, the problems of data reliability and business continuity in distributed storage systems under network jitter or abnormal conditions are solved, and write performance is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-01
AI Technical Summary
Ensuring data reliability and business continuity in distributed storage systems during network jitter or anomalies is a challenge.
When the directory quota usage is less than the usage threshold, a directory quota capacity pre-allocation scheme is adopted to allocate the directory quota capacity to a preset capacity and complete the subsequent write quota application locally, thereby reducing the number of interactions with the object storage device and improving write performance and data reliability.
In the event of network jitter or anomalies, it improves data reliability and business continuity, and enhances write performance.
Smart Images

Figure CN121958145A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of cloud computing technology, and in particular to data writing methods, devices, electronic devices, and media. Background Technology
[0002] Distributed storage is a technology that distributes data across multiple independent devices. With the development of digitalization, the application of distributed storage is expanding, and the amount of data on distributed storage systems is also increasing, leading to higher demands for data reliability and business continuity. In a distributed storage system, multiple physical hosts are connected via a network. Ensuring data reliability and business continuity under network fluctuations or anomalies poses a significant challenge to distributed storage systems. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this specification provides data writing methods, devices, electronic devices, and media.
[0004] According to a first aspect of the embodiments of this specification, a data writing method is provided, the method comprising: receiving a write request sent by a client, the write request including a write path, the write path corresponding to a target directory; obtaining, according to the write request, the directory quota usage and remaining capacity of the target directory; if the directory quota usage is less than a usage threshold and the remaining capacity is greater than a preset capacity, then requesting a first directory quota capacity of size equal to the preset capacity, the preset capacity being greater than the size of the data to be written; according to the first directory quota capacity, writing the data to be written corresponding to the write request; if other write requests sent by the client are received within a preset time period in the future, then writing other data to be written corresponding to the other write requests into the target directory according to the first directory quota capacity.
[0005] According to a second aspect of the embodiments of this specification, a data writing apparatus is provided, comprising: a receiving module, configured to receive a write request sent by a client, the write request including a write path, the write path corresponding to a target directory; an obtaining module, configured to obtain, according to the write request, the directory quota usage and remaining capacity of the target directory; a first request module, configured to request a first directory quota capacity of the size of the preset capacity if the directory quota usage is less than a usage threshold and the remaining capacity is greater than a preset capacity; a first writing module, configured to write data to be written corresponding to the write request into the target directory according to the first directory quota capacity, the preset capacity being greater than the size of the data to be written; and a second writing module, configured to write other data to be written corresponding to other write requests into the target directory according to the first directory quota capacity if other write requests are received from the client within a preset time period in the future.
[0006] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to execute the data writing method of the first aspect described above or any corresponding embodiment thereof.
[0007] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a computer to perform the data writing method of the first aspect or any corresponding embodiment described above.
[0008] The technical solutions provided in the embodiments of this specification may include the following beneficial effects: In the embodiments of this specification, when the directory quota usage is less than the usage threshold, a directory quota capacity pre-allocation scheme is adopted, that is, the directory quota capacity is allocated to a preset capacity. Subsequent write quota requests for this directory will be completed locally, thereby reducing the number of interactions with the object storage device, improving write performance, and improving data reliability and business continuity in the event of network jitter or network anomalies.
[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0011] Figure 1 This is a schematic diagram of a system architecture illustrated in this specification according to an exemplary embodiment.
[0012] Figure 2 This is a flowchart illustrating a data writing method according to an exemplary embodiment of this specification.
[0013] Figure 3 This is a flowchart illustrating another data writing method according to another exemplary embodiment of this specification.
[0014] Figure 4 This is a schematic diagram illustrating another catalog quota capacity recovery process according to an exemplary embodiment of this specification.
[0015] Figure 5 This is a hardware structure diagram of a computer device containing the data writing device according to an embodiment of this specification.
[0016] Figure 6 This is a block diagram illustrating a data writing apparatus according to an exemplary embodiment of this specification. Detailed Implementation
[0017] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0018] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0019] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0020] The embodiments described in this specification will now be described in detail.
[0021] The following combination Figure 1 The system architecture of the data writing methods and apparatus applicable to the embodiments of this specification will be described. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this specification, in order to help those skilled in the art understand the technical content of this specification, but do not mean that the embodiments of this specification cannot be used in other devices, systems, environments or scenarios.
[0022] Figure 1 This is a schematic diagram of a system architecture illustrated in this specification according to an exemplary embodiment.
[0023] like Figure 1 As shown, the system architecture may include, for example, a client and a storage cluster.
[0024] Clients can include, but are not limited to, smartphones, tablets, laptops, and desktop computers.
[0025] A storage cluster can include multiple hosts, such as host 1, host 2, and host 3. Each host can include a File Metadata Management Component (MDS) and an OSD (Object Storage Device). The storage cluster includes, but is not limited to, the Ceph file system CephFS.
[0026] An OSD (System-on-Demand) is an intelligent storage node that includes a CPU, memory, network interface, and disk. It manages data storage, secure access, and metadata processing. Users can initiate file write requests (including write path and size) to the file metadata management component via a client. Upon receiving the file write request, the MDS (Multi-Device Storage) queries the OSD for quota information from the persistent storage directory. After receiving the directory quota information from the OSD, the MDS determines whether the remaining directory quota capacity is sufficient for the write operation. If it is, the MDS updates the directory quota information with the required capacity and then refreshes the directory quota capacity information in the OSD. If the directory quota is insufficient, it returns an insufficient space error to the client.
[0027] The data writing method provided in the embodiments of this specification will be described in detail below. For example... Figure 2 As shown, Figure 2 This is a flowchart illustrating a data writing method according to an exemplary embodiment of this specification. This method can be applied, for example, to MDS. The data writing method provided in the embodiments of this specification may include the following steps.
[0028] In step 210, a write request is received from the client. The write request includes a write path, which corresponds to the target directory.
[0029] According to embodiments of this specification, a write request can be used to request that data be written to a write path.
[0030] In step 220, based on the write request, obtain the directory quota usage and remaining capacity of the target directory.
[0031] According to embodiments of this specification, for example, an object storage device corresponding to a target directory can be determined, and then the directory quota usage and remaining capacity of the target directory can be read from the object storage device. The directory quota usage can represent the quota capacity currently used by the target directory. The remaining capacity can represent the quota capacity currently available for the target directory.
[0032] In step 230, if the catalog quota usage is less than the usage threshold and the remaining capacity is greater than the preset capacity, then the first catalog quota capacity with a size of the preset capacity is requested.
[0033] According to the embodiments in this specification, the usage threshold and preset capacity can be set according to actual needs.
[0034] Optionally, a preset capacity can be set based on the size of a single write operation in the historical data of the storage system, so that the preset capacity is greater than the size of a single write operation.
[0035] For example, in this embodiment, the usage threshold can be 90% of the total directory quota capacity, and the preset capacity can be 1GB.
[0036] In step 240, according to the first directory quota capacity, the data to be written corresponding to the write request is written to the target directory, with the preset capacity being greater than the size of the data to be written.
[0037] According to embodiments of this specification, for example, within the limit of the first directory quota capacity, the data to be written corresponding to the write request can be written to the target directory. After the data to be written is written to the target directory, the first directory quota capacity is reduced by the write size corresponding to the data to be written.
[0038] In step 250, if other write requests are received from the client within a preset time period in the future, the other data to be written corresponding to the other write requests will be written to the target directory according to the quota capacity of the first directory.
[0039] According to the embodiments of this specification, if other write requests are received from the client within a preset time period in the future, the other data to be written corresponding to the other write requests can be written to the target directory within the limit of the first directory quota capacity. After the other data to be written is written to the target directory, the first directory quota capacity is reduced by the write size corresponding to the other data to be written.
[0040] According to the embodiments of this specification, the length of the preset time period can be set according to actual needs.
[0041] According to the embodiments in this specification, different write schemes are adopted based on the amount of directory quota used. When the directory quota usage is less than the usage threshold, a directory quota pre-allocation scheme is adopted, that is, the directory quota is allocated to a preset capacity. Subsequent write quota requests for this directory will be completed locally. This reduces the number of interactions with the object storage device, improves write performance, and enhances data reliability and business continuity in the event of network jitter or network anomalies.
[0042] Optionally, if the directory quota usage is greater than or equal to the usage threshold and the remaining capacity is greater than the write size, then a second directory quota capacity of the size of the write size is requested; and the data to be written in the write request is written to the target directory according to the second directory quota capacity.
[0043] According to the embodiments of this specification, in scenarios where the directory quota usage is greater than or equal to the usage threshold, the directory quota capacity usage is high. In order to avoid over-allocation of capacity anomalies, the default quota allocation method can be adopted. That is, every time data is written to the quota directory, it is necessary to query the object storage device and synchronously write the newly written directory quota capacity to the object storage device before returning to the client. This sacrifices performance to ensure cluster capacity security and user data security.
[0044] Optionally, the directory quota capacity of a directory can be recorded in the cache.
[0045] Therefore, after requesting the first directory quota capacity, the first directory quota capacity can be written to the cache. After the data to be written is written to the target directory, the first directory quota capacity recorded in the cache can be updated according to the amount of data to be written, that is, the difference between the first directory quota capacity and the write size is used as the new first directory quota capacity.
[0046] If other data to be written is received within a preset time period, the first directory quota capacity recorded in the cache is read. If the first directory quota capacity recorded in the cache is greater than or equal to the other data to be written, the other data to be written is written to the target directory. After the other data to be written is written to the target directory, the first directory quota capacity recorded in the cache is updated according to the amount of the other data to be written, that is, the difference between the first directory quota capacity and the write size is used as the new first directory quota capacity.
[0047] According to the embodiments of this specification, by recording the directory quota capacity of the target directory in the cache, subsequent queries of the directory quota capacity only need to read the directory quota capacity in the cache, without interacting with the object storage device, which can reduce the number of interactions and improve write performance.
[0048] Optionally, a quota pre-allocation list can be set up in the cache. The directory quota capacity can be recorded in the quota pre-allocation list in the cache, and the latest directory quota capacity can be persisted to the corresponding OSD. Subsequently, the unused directory quota capacity can be obtained through the quota pre-allocation list.
[0049] Optionally, if no other write requests are received within a preset time period, the unused directory quota capacity in the first directory can be reclaimed. By reclaiming directory quota capacity, resource consumption can be reduced and resource utilization improved.
[0050] For example, in this embodiment, a pre-allocated quota reclamation process can be set up to reclaim and calibrate the directory quota capacity in the background. The pre-allocated quota reclamation process can periodically check the pre-allocated directories. If no write requests occur within a preset time period, the pre-allocated unused directory quota capacity can be reclaimed and persistently recorded in the object storage device.
[0051] like Figure 3 The diagram shown is a flowchart illustrating another data writing method according to an exemplary embodiment.
[0052] In this embodiment, a usage threshold for the directory quota capacity can be preset and written to a configuration file. For example, in this embodiment, the usage threshold can be 90% of the total capacity by default; when the distributed file storage system is initialized, the usage threshold can be obtained from the configuration file.
[0053] When a client sends a write request to the distributed file storage system, the system initiates a write request to the metadata management component, such as MDS, and simultaneously passes the write path and write size to MDS. For example, in this embodiment, the write path could be / data / info / xxx, and the write size could be 32MB.
[0054] MDS determines the corresponding OSD that stores the directory quota capacity by writing the path, and then sends a directory quota capacity query request to this OSD to obtain the current directory quota information (including but not limited to directory quota capacity).
[0055] If the MDS detects that the directory quota usage is below the usage threshold and the remaining directory quota capacity is greater than the preset capacity (e.g., 1GB), it requests a target directory quota capacity of the preset size, records the corresponding directory in the pre-allocation list in the cache, and persists the latest directory quota capacity to the corresponding OSD. Subsequent quota capacity updates within the target directory quota capacity range will be performed in the MDS cache without needing to query the corresponding OSD or update the directory quota information of the corresponding OSD.
[0056] When the usage of the previous directory quota capacity exceeds the usage threshold, in order to avoid over-allocation due to the high utilization rate of the directory quota capacity, each directory quota query request follows the process as follows: first, obtain the directory quota information from the corresponding OSD, calculate the required quota capacity, and then write the new quota capacity to the OSD.
[0057] According to the embodiments in this specification, metadata cache space corresponding to directory quota information can be reserved in the MDS metadata cache, and all directory quota information can be permanently stored in the MDS cache. When there is a quota query or quota update request, after the directory quota information is obtained for the first time, the directory quota information is permanently stored in the MDS metadata cache, and subsequent queries will not require offline queries, thus improving query efficiency.
[0058] like Figure 4 The diagram shown illustrates another catalog quota capacity recovery process according to an exemplary embodiment. Based on the aforementioned embodiments, this embodiment describes a process for recovering catalog quota capacity, including the following steps: 1. The calibration task obtains the unused directory quota capacity through the quota pre-allocation statistics linked list (referred to as the quota pre-allocation linked list). Directories may include, for example, / data / src, / root / info, etc.
[0059] For example, in this embodiment, the quota calibration process can perform a calibration task every 60 seconds by default.
[0060] 2. Obtain directory metadata information to confirm the recent access status of this directory.
[0061] 3. For directories that meet the quota recovery conditions, the calibration module performs a stat traversal on the directory to confirm its actual usage, and then feeds back the correct information to the calibration task. The stat function is used to obtain detailed information about the files.
[0062] If the directory does not receive any other write requests from the client within 60 seconds, the directory is deemed to meet the quota reclamation criteria.
[0063] 4. The correct quota information after calibration is persistently written to the database of the corresponding OSD.
[0064] According to the embodiments in this specification, by adding a directory quota pre-allocation mechanism to the metadata management component in a distributed file storage system, a quota request function can be quickly responded to. This avoids disk lookups and disk updates of quota information, thus improving file storage write performance. Furthermore, by caching all quota information in the metadata management component's cache, it can be ensured that quota queries will be found in the metadata cache, avoiding disk lookups of quota information and improving file storage read performance.
[0065] In distributed file storage scenarios with a large number of continuous writes, the time-consuming quota write process leads to high latency in write requests, causing client-side lag. According to embodiments of this disclosure, a segmented approach to directory quota capacity is used. In scenarios where directory quota usage is below the usage threshold, a pre-allocation of directory quota capacity, cache hits, and a weak consistency calibration mechanism are employed to ensure directory performance. In scenarios where directory quota usage exceeds the usage threshold, a strong data consistency mechanism is used, sacrificing business performance to ensure the accuracy of the quota capacity.
[0066] Corresponding to the embodiments of the aforementioned methods, this specification also provides embodiments of a data writing device and the terminal to which it is applied.
[0067] The embodiments of the data writing device described in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor reading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 5 The diagram shown is a hardware structure diagram of a computer device containing the data writing device according to an embodiment of this specification. Except for... Figure 5 In addition to the processor 510, memory 530, network interface 520, and non-volatile memory 540 shown, the server or electronic device where the device 531 is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.
[0068] like Figure 6 As shown, Figure 6 This is a block diagram illustrating a data writing apparatus according to an exemplary embodiment of the present specification, the apparatus comprising: The receiving module 610 is used to receive write requests sent by the client. The write request includes a write path, and the write path corresponds to the target directory. The acquisition module 620 is used to obtain the directory quota usage and remaining capacity of the target directory based on the write request; The first application module 630 is used to apply for a first catalog quota capacity of the preset capacity if the catalog quota usage is less than the usage threshold and the remaining capacity is greater than the preset capacity. The first writing module 640 is used to write the data to be written corresponding to the write request to the target directory according to the quota capacity of the first directory, with the preset capacity being greater than the size of the data to be written. The second write module 650 is used to write other data to be written corresponding to other write requests to the target directory according to the quota capacity of the first directory if other write requests are received from the client within a preset time period in the future.
[0069] Optionally, the acquisition module may include: The determination submodule is used to determine the object storage device corresponding to the target directory; The read submodule is used to read the directory quota usage and remaining capacity of the target directory from the object storage device.
[0070] Optionally, the write request may also include a write size; the device may also include: The second application module is used to apply for a second directory quota capacity equal to the write size if the directory quota usage is greater than or equal to the usage threshold and the remaining capacity is greater than the write size. The third write module is used to write the data to be written in the write request to the target directory according to the quota capacity of the second directory.
[0071] Optionally, the device may further include: The cache write module is used to write the first directory quota capacity into the cache; The update module is used to update the first directory quota capacity recorded in the cache according to the amount of data to be written after the data to be written is written to the target directory. The second writing module may include: The cache read submodule is used to read the first directory quota capacity recorded in the cache if other data to be written is received within a preset time period in the future. The fourth write submodule is used to write other data to the target directory if the quota capacity of the first directory recorded in the cache is greater than or equal to that of other data to be written. The cache update submodule is used to update the first directory quota capacity recorded in the cache based on the amount of other data to be written after other data to be written to the target directory.
[0072] Optionally, the device may further include: The recycling module is used to reclaim the unused directory quota capacity in the first directory if no other write requests are received within a preset time period in the future.
[0073] According to the embodiments in this specification, different write schemes are adopted based on the amount of directory quota used. When the directory quota usage is less than the usage threshold, a directory quota pre-allocation scheme is adopted, that is, the directory quota is allocated to a preset capacity. Subsequent write quota requests for this directory will be completed locally. This reduces the number of interactions with the object storage device, improves write performance, and enhances data reliability and business continuity in the event of network jitter or network anomalies.
[0074] Accordingly, this specification also provides an electronic device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: receive a write request sent by a client, the write request including a write path, the write path corresponding to a target directory; according to the write request, obtain the directory quota usage and remaining capacity of the target directory; if the directory quota usage is less than a usage threshold and the remaining capacity is greater than a preset capacity, then request a first directory quota capacity of a size equal to the preset capacity, the preset capacity being greater than the size of the data to be written; according to the first directory quota capacity, write the data to be written corresponding to the write request; if other write requests are received from the client within a preset time period in the future, then according to the first directory quota capacity, write other data to be written corresponding to the other write requests into the target directory.
[0075] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0076] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0077] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0078] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.
[0079] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.
[0080] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A data writing method, characterized in that, The method includes: Receive a write request sent by the client, the write request including a write path, the write path corresponding to the target directory; Based on the write request, obtain the directory quota usage and remaining capacity of the target directory; If the catalog quota usage is less than the usage threshold and the remaining capacity is greater than the preset capacity, then the requested size is the first catalog quota capacity of the preset capacity; Based on the first directory quota capacity, the data to be written corresponding to the write request is selected, and the preset capacity is greater than the size of the data to be written. If other write requests are received from the client within a preset time period in the future, then the other data to be written corresponding to the other write requests will be written to the target directory according to the first directory quota capacity.
2. The method according to claim 1, characterized in that, The step of obtaining the directory quota usage and remaining capacity of the target directory based on the write request includes: Determine the object storage device corresponding to the target directory; Read the directory quota usage and remaining capacity of the target directory from the object storage device.
3. The method according to claim 1, characterized in that, The write request also includes a write size; the method also includes: If the directory quota usage is greater than or equal to the usage threshold, and the remaining capacity is greater than the write size, then the requested size is a second directory quota capacity equal to the write size. Based on the second directory quota capacity, the data to be written in the write request is written to the target directory.
4. The method according to claim 1, characterized in that, The method further includes: Write the first directory quota capacity into the cache; After writing the data to be written to the target directory, the first directory quota capacity recorded in the cache is updated according to the amount of data to be written. Based on the first directory quota capacity, the data to be written corresponding to the other write requests is written to the target directory, including: If other data to be written is received within the preset future time period, the first directory quota capacity recorded in the cache is read. If the first directory quota capacity recorded in the cache is greater than or equal to the other data to be written, then the other data to be written is written to the target directory; After writing the other data to be written to the target directory, the first directory quota capacity recorded in the cache is updated according to the amount of the other data to be written.
5. The method according to claim 1, characterized in that, The method further includes: If no other write requests are received within a preset time period in the future, the unused directory quota capacity in the first directory quota capacity will be reclaimed.
6. A data writing device, characterized in that, The device includes: The receiving module is used to receive write requests sent by the client, wherein the write request includes a write path and the write path corresponds to the target directory; The acquisition module is used to acquire the directory quota usage and remaining capacity of the target directory based on the write request. The first application module is used to apply for a first directory quota capacity equal to the preset capacity if the directory quota usage is less than the usage threshold and the remaining capacity is greater than the preset capacity. The first writing module is used to write the data to be written corresponding to the write request into the target directory according to the first directory quota capacity, wherein the preset capacity is greater than the size of the data to be written; The second writing module is used to write other data to be written corresponding to the other write requests to the target directory according to the quota capacity of the first directory if other write requests are received from the client within a preset time period in the future.
7. The apparatus according to claim 6, characterized in that, The acquisition module includes: The determination submodule is used to determine the object storage device corresponding to the target directory; The read submodule is used to read the directory quota usage and remaining capacity of the target directory from the object storage device.
8. The apparatus according to claim 6, characterized in that, The write request also includes a write size; the device also includes: The second application module is used to apply for a second directory quota capacity equal to the write size if the directory quota usage is greater than or equal to the usage threshold and the remaining capacity is greater than the write size. The third write module is used to write the data to be written in the write request to the target directory according to the quota capacity of the second directory.
9. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store processor-executable instructions; The processor is configured to perform the data writing method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the data writing method according to any one of claims 1 to 5.