CN113961383A - Method and device for determining status information of write operation and storage medium - Google Patents

Method and device for determining status information of write operation and storage medium Download PDF

Info

Publication number
CN113961383A
CN113961383A CN202111047428.8A CN202111047428A CN113961383A CN 113961383 A CN113961383 A CN 113961383A CN 202111047428 A CN202111047428 A CN 202111047428A CN 113961383 A CN113961383 A CN 113961383A
Authority
CN
China
Prior art keywords
write
information
record
writing
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111047428.8A
Other languages
Chinese (zh)
Inventor
胡一帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Hangzhou Youxing Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202111047428.8A priority Critical patent/CN113961383A/en
Publication of CN113961383A publication Critical patent/CN113961383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The method comprises the steps of obtaining first identification information of write-in operation corresponding to a write-in instruction when a data write-in module is detected to respond to the write-in instruction, determining a monitoring module corresponding to the write-in operation and preset error threshold information corresponding to the write-in operation from a storage module based on the first identification information, sending a write-in record information obtaining request to the monitoring module, receiving write-in record information feedback sent by the monitoring module, wherein the write-in record information feedback comprises the write-in record information corresponding to the write-in operation, and determining the state information of the write-in operation according to the write-in record information and the preset error threshold information. Based on the embodiment of the application, the error can be controlled within a tolerable range, and the stability of the written data can be ensured.

Description

Method and device for determining status information of write operation and storage medium
Technical Field
The present invention relates to the field of big data processing technologies, and in particular, to a method and an apparatus for determining status information of write operations, and a storage medium.
Background
Apache Flink is an open source computing platform for distributed data stream processing and batch data processing developed by the Apache software foundation, is a distributed stream data engine written by Java code, and has the characteristics of high throughput and low delay. A flight job is divided into a plurality of tasks during running, the tasks can be divided into three types of reading, writing and converting, each task corresponds to a task identifier, each task can be divided into a plurality of subtasks, and the subtasks can be executed on one or more task managers.
In a practical big data processing application scenario, the Flink job often encounters various write errors when writing data to a target data source, including: field format errors, e.g., inserting string-type data into numeric fields of the MySQL database, primary key collision errors, null pointer errors, etc. Since data is huge and complicated in the process of processing big data, errors need to be controlled within a tolerable range in order to ensure the stability of data processing.
Disclosure of Invention
The embodiment of the application provides a method and a device for determining status information of write operation and a storage medium, so that errors are controlled within a tolerable range, and stability of write data can be guaranteed.
The embodiment of the application provides a method for determining status information of write operation, which comprises the following steps:
when the data writing module is detected to respond to the writing instruction, first identification information of the writing operation corresponding to the writing instruction is obtained;
determining a monitoring module corresponding to the write-in operation and preset error threshold information corresponding to the write-in operation from a storage module based on the first identification information;
sending a request for obtaining write-in record information to a monitoring module;
receiving write-in record information feedback sent by a monitoring module; the write record information feedback comprises write record information corresponding to the write operation;
and determining the status information of the write operation according to the write record information and the preset error threshold information.
Further, the write record information includes the number of erroneous recording pieces and/or the total number of write records;
the preset error threshold information comprises a preset error record number threshold and/or a preset error record proportion threshold.
Further, determining status information of the write operation according to the write log information and the preset error threshold information includes:
determining the ratio of the current error records according to the number of the error records and the total number of the written records;
and determining the status information of the write operation according to the current error record occupation ratio and a preset error record occupation ratio threshold.
Further, the write operation includes a plurality of write tasks;
when it is detected that the data writing module responds to the writing instruction, acquiring first identification information of a writing operation corresponding to the writing instruction, wherein the first identification information comprises:
when the data writing module is detected to respond to the writing instruction, first identification information of the writing operation corresponding to the writing instruction and second identification information of each writing task are obtained.
Further, the write record information feedback includes write record information corresponding to each write task;
determining status information of the write operation according to the write record information and the preset error threshold information, comprising:
determining preset error threshold information corresponding to each writing task from the storage module based on the first identification information and the second identification information of each writing task;
and determining state information corresponding to the write operation and a write failure task set according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
Further, each write task includes a plurality of write subtasks;
when it is detected that the data writing module responds to the writing instruction, acquiring first identification information of a writing operation corresponding to the writing instruction, wherein the first identification information comprises:
when the data writing module is detected to respond to the writing instruction, first identification information of the writing operation corresponding to the writing instruction, second identification information of each writing task and third identification information of each subtask are obtained.
Further, the write record information feedback comprises write record information corresponding to each write subtask;
determining status information of the write operation according to the write record information and the preset error threshold information, comprising:
determining preset error threshold information corresponding to each writing subtask from the storage module based on the first identification information, the second identification information of each writing task and the third identification information of each writing subtask;
and determining state information, a write failure task set and a write failure subtask set corresponding to the write operation according to the preset error threshold information corresponding to each write subtask and the write record information corresponding to each write subtask.
Further, determining the status information of the write operation according to the current error record proportion and a preset error record proportion threshold, comprising:
if the current error record proportion is larger than a preset error record proportion threshold value, determining the state information of the write-in operation as write-in failure;
and if the current error record ratio is less than or equal to the preset error record ratio threshold, determining that the writing operation status information is successful.
Correspondingly, the embodiment of the present application further provides an apparatus for determining status information of a write job, where the apparatus includes:
the acquisition module is used for acquiring first identification information of the write operation corresponding to the write instruction when the data write module is detected to respond to the write instruction;
the first determining module is used for determining a monitoring module corresponding to the write-in operation and preset error threshold information corresponding to the write-in operation from the storage module based on the first identification information;
the sending module is used for sending a written record information acquisition request to the monitoring module;
the receiving module is used for receiving the write-in record information feedback sent by the monitoring module; the write record information feedback comprises write record information corresponding to the write operation;
and the second determining module is used for determining the state information of the write operation according to the write record information and the preset error threshold information.
Further, the write record information includes the number of erroneous recording pieces and/or the total number of write records;
the preset error threshold information comprises a preset error record number threshold and/or a preset error record proportion threshold.
Further, the second determining module is used for determining the current error record ratio according to the number of the error records and the total number of the written records;
and determining the status information of the write operation according to the current error record occupation ratio and a preset error record occupation ratio threshold.
Further, the write operation includes a plurality of write tasks;
and the acquisition module is used for acquiring the first identification information of the write operation corresponding to the write instruction and the second identification information of each write task when the data write module is detected to respond to the write instruction.
Further, the write record information feedback includes write record information corresponding to each write task;
the second determining module is used for determining preset error threshold information corresponding to each writing task from the storage module based on the first identification information and the second identification information of each writing task;
and determining state information corresponding to the write operation and a write failure task set according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
Further, each write task includes a plurality of write subtasks;
and the acquisition module is used for acquiring the first identification information of the write operation, the second identification information of each write task and the third identification information of each subtask corresponding to the write instruction when the data write module is detected to respond to the write instruction.
Further, the write record information feedback comprises write record information corresponding to each write subtask;
the second determining module is used for determining preset error threshold information corresponding to each writing subtask from the storage module based on the first identification information, the second identification information of each writing task and the third identification information of each writing subtask;
and determining state information, a write failure task set and a write failure subtask set corresponding to the write operation according to the preset error threshold information corresponding to each write subtask and the write record information corresponding to each write subtask.
Further, the second determining module is configured to determine that the status information of the write operation is a write failure if the current error record occupancy is greater than a preset error record occupancy threshold;
and if the current error record ratio is less than or equal to the preset error record ratio threshold, determining that the writing operation status information is successful.
Accordingly, an embodiment of the present application further provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for determining status information of a write job.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the method for determining status information of a write operation described above.
The embodiment of the application has the following beneficial effects:
the method comprises the steps of obtaining first identification information of write-in operation corresponding to a write-in instruction when a data write-in module is detected to respond to the write-in instruction, determining a monitoring module corresponding to the write-in operation and preset error threshold information corresponding to the write-in operation from a storage module based on the first identification information, sending a write-in record information obtaining request to the monitoring module, receiving write-in record information feedback sent by the monitoring module, wherein the write-in record information feedback comprises the write-in record information corresponding to the write-in operation, and determining the state information of the write-in operation according to the write-in record information and the preset error threshold information. Based on the embodiment of the application, the status information of the write operation is determined according to the write record information and the preset error threshold information, the error can be controlled within a tolerable range, and the stability of the write data can be ensured.
Drawings
In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
FIG. 2 is a system diagram of an apparatus for determining status information of a write operation according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an example of a flight job provided in an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for determining status information of a write operation according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for determining status information of a write operation according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be apparent that the described embodiment is only one embodiment of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An "embodiment" as referred to herein relates to a particular feature, structure, or characteristic that may be included in at least one implementation of the present application. In the description of the embodiments of the present application, it should be understood that the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein. Furthermore, the terms "comprises" and "comprising," as well as any variations thereof, are intended to cover non-exclusive inclusions.
Please refer to fig. 1, which is a schematic diagram of an application environment according to an embodiment of the present application, including: the determining device of the state information of the write-in operation can be loaded on a server, the implementation class of the RichOutputFormat can be defined on the server based on computer programming language Java codes, an object of the implementation class of the RichOutputFormat is further established, and then the distributed data stream object is written into the object of the implementation class of the RichOutputFormat.
In an alternative embodiment, the determining device for the status information of the write operation may include a data writing module, an error control module, a monitoring module, and a data storage module. Fig. 2 is a system diagram of a device for determining status information of a write job according to an embodiment of the present application, where a data writing module, a monitoring module, an error control module, and a data storage module may be integrated on each server in a distributed network structure. Therefore, the monitoring module on each server can monitor the written record information of the monitoring module, and the processing resources of the server can be reduced. In addition, a monitoring module can be arranged on one server in the distributed network structure, in addition, a data writing module, an error control module and a data storage module can be integrated on each server, the monitoring module on one server monitors other servers except the server, writing record information of other servers can be uniformly monitored and managed, and the use feeling of users is improved.
In an alternative embodiment, the write job may include multiple write tasks, each of which may include multiple write subtasks. The server carrying the determination means of the status information of the write job may be specifically used for each write subtask of each write task of the runtime instance of the Flink job. That is, the runtime instance of the Flink job may include multiple write tasks and multiple write subtasks. Fig. 3 is a schematic diagram of an example of a Flink job provided in an embodiment of the present application, where the example of the Flink job may include a read task and a write task, where the read task may include a plurality of read subtasks, and the write task may include a plurality of write subtasks.
In a specific embodiment, when it is detected that the data writing module responds to the write command, the server bearing the determination apparatus of the status information of the write job may obtain first identification information of the write job corresponding to the write command, and determine, based on the first identification information, the monitoring module corresponding to the write job and the preset error threshold information corresponding to the write job from the storage module, further send a write record information obtaining request to the monitoring module, and then receive a write record information feedback sent by the monitoring module, where the write record information feedback includes the write record information corresponding to the write job, and then determine the status information of the write job according to the write record information and the preset error threshold information.
The following describes a specific embodiment of the method for determining status information of a write operation, and fig. 4 is a flowchart of the method for determining status information of a write operation provided in the embodiment of the present application, and the present specification provides the method operation steps as shown in the embodiment or the flowchart, but may include more or less operation steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is only one of many possible orders of execution and does not represent the only order of execution, and in actual execution, the steps may be performed sequentially or in parallel as in the embodiments or methods shown in the figures (e.g., in the context of parallel processors or multi-threaded processing). Specifically, as shown in fig. 4, the method includes:
s401: when the data writing module is detected to respond to the writing instruction, first identification information of the writing operation corresponding to the writing instruction is obtained.
In the embodiment of the present application, a determination device for determining status information of a write operation may be embedded in an implementation class of RichOutputFormat, and further, preset error threshold information of each write operation may be defined in a starting process of the implementation class of RichOutputFormat. Specifically, the determination means of the status information of the write job may be initialized first, and then started.
In an optional process of initializing a determination apparatus for writing status information of a job, in the initialization process, an object of the MetricGroup class may be obtained, a getAllVariables method of the MetricGroup class may be called to obtain a dictionary object, a keyword < jobid > is queried in the dictionary object to obtain first identification information of each job, that is, a job ID, and define corresponding preset error threshold information, so that the first identification information and the preset error threshold information are correspondingly stored in a data storage module. The preset error threshold information may include the number of error records and/or the total number of write records. Since a write job may include multiple write tasks, each write task may include multiple write subtasks, each write task may have a corresponding second identification, i.e., a write task ID, and each write subtask may have a corresponding third identification, i.e., a write subtask ID. Accordingly, in defining the preset error threshold information for each job, the preset error threshold information for each writing task and the preset error threshold information for each sub-writing task may also be defined.
In an alternative procedure of starting the determining means of the status information of the write operation, the timing means may be started to trigger the determining means of the status information of the write operation to update the status information at a fixed period.
In this embodiment of the application, when it is detected that the data writing module responds to the write command, the error control module may obtain first identification information of the write operation corresponding to the write command. The first identification information may be an identity of the write job, i.e., a write job ID.
In a specific embodiment, the first identification information may be a Flink job ID.
In an alternative embodiment, when it is detected that the data writing module responds to the write command, the error control module may acquire the first identification information of the write job and the second identification information of each write task.
In an alternative embodiment, when it is detected that the data writing module responds to the write command, the error control module may acquire the first identification information of the write job, the second identification information of each write task, and the third identification information of each write subtask.
S403: and determining a monitoring module corresponding to the writing operation and preset error threshold information corresponding to the writing operation from the storage module based on the first identification information.
In this embodiment, the error control module may determine, from the storage module, the monitoring module corresponding to the write operation and the preset error threshold information corresponding to the write operation based on the first identification information of the write operation. Because the error control module and the data storage module are integrated on the server, namely the data storage module is a local data storage library of the error control module, the resources of data transmission and data leakage in the data transmission process can be reduced.
In an optional implementation manner, the error control module may determine, from the storage module, a monitoring module corresponding to the write task and preset error threshold information corresponding to the write task based on the second identification information.
In an optional implementation manner, the error control module may determine, from the storage module, the monitoring module corresponding to the writing subtask and preset error threshold information corresponding to the writing subtask based on the third identification information.
In this embodiment, the preset error threshold information may include a preset number threshold of error records and/or a preset ratio threshold of error records.
S405: and sending a write record information acquisition request to the monitoring module.
In this embodiment of the application, after determining the monitoring module corresponding to the write operation, the error control module may send a write log information acquisition request to the corresponding monitoring module. Namely, a data transmission protocol request is sent to the monitoring server, and the address of the data transmission protocol request is formed by splicing the address of the monitoring module and the first identification information according to the following format:
${monitorURL}/jobs/${jobId}/accumulators
wherein monitorerll represents an address of the monitoring module, and the jobId represents the first identification information.
S407: receiving write-in record information feedback sent by a monitoring module; the write log information feedback includes write log information corresponding to the write operation.
In the embodiment of the present application, the error control module sends a write record information acquisition request to the corresponding monitoring module, and receives a write record information feedback sent by the corresponding monitoring module, where the write record information feedback includes write record information corresponding to a write operation. That is, the monitoring module periodically monitors the performance index of the write operation, and after receiving the write record information acquisition request sent by the error control module, extracts the write record information corresponding to the write operation from the performance index and feeds the write record information back to the error control module.
In an alternative embodiment, the write record information may include the number of error records and/or the total number of write records corresponding to the write operation.
In an alternative embodiment, the write record information may include the number of error records and/or the total number of write records corresponding to each write task.
In an alternative embodiment, the write record information may include the number of error records and/or the total number of write records corresponding to each write subtask.
S409: and determining the status information of the write operation according to the write record information and the preset error threshold information.
In this embodiment, the error control module may determine the status information of the write operation according to the number of error records, the total number of write records, the preset threshold for the number of error records, and the preset threshold for the ratio of error records. The status information of the write operation includes write success and write failure.
In an alternative embodiment, the error control module may determine the current error record proportion according to the number of error records and the total number of write records, and further determine the status information of the write operation according to the current error record proportion and a preset error record proportion threshold. And if the current error record ratio is larger than the preset error record ratio threshold, determining that the status information of the write-in operation is write-in failure, and if the current error record ratio is smaller than or equal to the preset error record ratio threshold, determining that the status information of the write-in operation is write-in success.
Optionally, the error control module may determine the number of error records and the total number of write records in the entire write process when the write instruction is successfully executed, that is, after the entire write is completed, and further determine the current error record proportion, and further determine the status information of the write operation according to the current error record proportion and a preset error record proportion threshold.
Optionally, the error control module may determine the current number of error records and the total number of write records during the execution of the write instruction, that is, during the write operation, to further determine the current error record proportion, and further determine the status information of the write operation according to the current error record proportion and a preset error record proportion threshold.
Optionally, the error control module may determine the state information corresponding to the write operation and the write failure task set according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
Optionally, the error control module may determine, according to the preset error threshold information corresponding to each write-in subtask and the write-in record information corresponding to each write-in subtask, state information corresponding to the write-in job, a write-in failed task set, and a write-in failed subtask set.
In another alternative embodiment, the error control module may determine the status information of the write operation according to the number of error records and a preset threshold of the number of error records. And if the number of the error records is larger than the preset number threshold of the error records, determining that the status information of the write-in operation is write failure, and if the number of the error records is smaller than or equal to the preset number of the error records, determining that the status information of the write-in operation is write success.
In the embodiment of the application, after the error control device determines the status information of the write job, the first identification information corresponding to the write job and the status information of the write job may be correspondingly stored in the data storage module to update the status of the write job in the data storage module. When a state query request sent by the implementation class of RichOutputFormat is received, if the state information of the write-in operation is write failure, the error control module sends the state information of the corresponding operation to the implementation class of RichOutputFormat. If the status information of the write operation is a write failure, it is necessary to control to interrupt the entire write operation.
By adopting the method for determining the status information of the write-in operation provided by the embodiment of the application, the status information of the write-in operation is determined according to the write-in record information and the preset error threshold information, the error can be controlled within a tolerable range, and the stability of the write-in data can be ensured.
Fig. 5 is a schematic structural diagram of an apparatus for determining status information of a write job provided in an embodiment of the present application, and as shown in fig. 5, the apparatus may include:
the obtaining module 501 is configured to obtain first identification information of a write job corresponding to a write instruction when it is detected that the data writing module responds to the write instruction;
the first determining module 503 is configured to determine, based on the first identification information, a monitoring module corresponding to the write operation and preset error threshold information corresponding to the write operation from the storage module;
the sending module 505 is configured to send a request for obtaining write record information to the monitoring module;
the receiving module 507 is configured to receive write record information feedback sent by the monitoring module; the write record information feedback comprises write record information corresponding to the write operation;
the second determining module 509 is configured to determine status information of the write job according to the write log information and the preset error threshold information.
In the embodiment of the application, the written record information comprises the number of error records and/or the total number of written records;
the preset error threshold information comprises a preset error record number threshold and/or a preset error record proportion threshold.
In this embodiment of the application, the second determining module 509 is configured to determine a ratio of current error records according to the number of error records and the total number of write records;
and determining the status information of the write operation according to the current error record occupation ratio and a preset error record occupation ratio threshold.
In the embodiment of the application, the writing operation comprises a plurality of writing tasks;
the obtaining module 501 is configured to obtain first identification information of a write job corresponding to a write instruction and second identification information of each write task when it is detected that the data writing module responds to the write instruction.
In the embodiment of the application, the write record information feedback comprises write record information corresponding to each write task;
the second determining module 509 is configured to determine, from the storage module, preset error threshold information corresponding to each write task based on the first identification information and the second identification information of each write task;
and determining state information corresponding to the write operation and a write failure task set according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
In the embodiment of the application, each writing task comprises a plurality of writing subtasks;
the obtaining module 501 is configured to obtain, when it is detected that the data writing module responds to the writing instruction, first identification information of a writing job corresponding to the writing instruction, second identification information of each writing task, and third identification information of each subtask.
In the embodiment of the application, the write record information feedback comprises write record information corresponding to each write subtask;
the second determining module 509 is configured to determine, from the storage module, preset error threshold information corresponding to each write subtask based on the first identification information, the second identification information of each write task, and the third identification information of each write subtask;
and determining state information, a write failure task set and a write failure subtask set corresponding to the write operation according to the preset error threshold information corresponding to each write subtask and the write record information corresponding to each write subtask.
In this embodiment, the second determining module 509 is configured to determine that the status information of the write operation is a write failure if the current error record proportion is greater than a preset error record proportion threshold;
and if the current error record ratio is less than or equal to the preset error record ratio threshold, determining that the writing operation status information is successful.
The device and method embodiments in the embodiments of the present application are based on the same application concept.
By adopting the device for determining the status information of the write-in operation provided by the embodiment of the application, the status information of the write-in operation is determined according to the write-in record information and the preset error threshold information, the error can be controlled within a tolerable range, and the stability of the write-in data can be ensured.
The present invention further provides an electronic device, which may be disposed in a server to store at least one instruction, at least one program, a code set, or a set of instructions related to a method for determining status information of a write operation in the method embodiment, where the at least one instruction, the at least one program, the code set, or the set of instructions are loaded from the memory and executed to implement the method for determining status information of a write operation.
The present invention also provides a storage medium, which may be disposed in a server to store at least one instruction, at least one program, a code set, or a set of instructions related to a method for determining status information of a write operation in the method embodiment, where the at least one instruction, the at least one program, the code set, or the set of instructions are loaded and executed by the processor to implement the method for determining status information of a write operation.
Optionally, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, a storage medium including: various media that can store program codes, such as a usb disk, a Read-only Memory (ROM), a removable hard disk, a magnetic disk, or an optical disk.
As can be seen from the embodiments of the method, the apparatus, the electronic device, or the storage medium for determining status information of a write operation provided by the present application, the method includes obtaining first identification information of a write operation corresponding to a write instruction when it is detected that a data write module responds to the write instruction, determining a monitoring module corresponding to the write operation and preset error threshold information corresponding to the write operation from a storage module based on the first identification information, sending a write record information obtaining request to the monitoring module, receiving a write record information feedback sent by the monitoring module, where the write record information feedback includes write record information corresponding to the write operation, and determining status information of the write operation according to the write record information and the preset error threshold information. Based on the embodiment of the application, the status information of the write operation is determined according to the write record information and the preset error threshold information, the error can be controlled within a tolerable range, and the stability of the write data can be ensured.
It should be noted that: the foregoing sequence of the embodiments of the present application is for description only and does not represent the superiority and inferiority of the embodiments, and the specific embodiments are described in the specification, and other embodiments are also within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in the order of execution in different embodiments and achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown or connected to enable the desired results to be achieved, and in some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment is described with emphasis on differences from other embodiments. Especially, for the embodiment of the device, since it is based on the embodiment similar to the method, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (18)

1. A method for determining status information for a write operation, comprising:
when detecting that a data writing module responds to a writing instruction, acquiring first identification information of a writing operation corresponding to the writing instruction;
determining a monitoring module corresponding to the write-in operation and preset error threshold information corresponding to the write-in operation from a storage module based on the first identification information;
sending a request for obtaining write-in record information to the monitoring module;
receiving write-in record information feedback sent by the monitoring module; the write record information feedback comprises write record information corresponding to the write operation;
and determining the state information of the write operation according to the write record information and the preset error threshold information.
2. The method according to claim 1, wherein the write record information includes a number of erroneous recording pieces and/or a total number of write recording pieces;
the preset error threshold information comprises a preset error record number threshold and/or a preset error record proportion threshold.
3. The method according to claim 2, wherein the determining the status information of the write job according to the write log information and the preset error threshold information comprises:
determining the current error record ratio according to the number of the error records and the total number of the write records;
and determining the state information of the write operation according to the current error record occupation ratio and the preset error record occupation ratio threshold.
4. The method of claim 1, wherein the write operation comprises a plurality of write tasks;
when it is detected that the data writing module responds to a writing instruction, acquiring first identification information of the writing operation corresponding to the writing instruction, including:
when it is detected that the data writing module responds to a writing instruction, first identification information of the writing operation and second identification information of each writing task corresponding to the writing instruction are obtained.
5. The method according to claim 4, wherein the write log information feedback comprises the write log information corresponding to each write task;
determining the status information of the write operation according to the write record information and the preset error threshold information, including:
determining preset error threshold information corresponding to each writing task from the storage module based on the first identification information and the second identification information of each writing task;
and determining the state information and the write failure task set corresponding to the write operation according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
6. The method of claim 4, wherein each write task comprises a plurality of write subtasks;
when it is detected that the data writing module responds to a writing instruction, acquiring first identification information of the writing operation corresponding to the writing instruction, including:
when it is detected that the data writing module responds to a writing instruction, acquiring first identification information of the writing operation, second identification information of each writing task and third identification information of each subtask corresponding to the writing instruction.
7. The method according to claim 6, wherein the write log information feedback comprises the write log information corresponding to each write subtask;
determining the status information of the write operation according to the write record information and the preset error threshold information, including:
determining preset error threshold information corresponding to each writing subtask from the storage module based on the first identification information, the second identification information of each writing task and the third identification information of each writing subtask;
and determining the state information, the write failure task set and the write failure subtask set corresponding to the write operation according to the preset error threshold information corresponding to each write subtask and the write record information corresponding to each write subtask.
8. The method of claim 3, wherein determining the status information of the write job according to the current error log proportion and the preset error log proportion threshold comprises:
if the current error record proportion is larger than the preset error record proportion threshold, determining that the state information of the write-in operation is write failure;
and if the current error record proportion is less than or equal to the preset error record proportion threshold, determining that the state information of the write-in operation is write-in success.
9. An apparatus for determining status information of a write operation, comprising:
the data writing module is used for writing data into the data storage module according to the first identification information of the writing operation corresponding to the writing instruction;
a first determining module, configured to determine, based on the first identification information, a monitoring module corresponding to the write operation and preset error threshold information corresponding to the write operation from a storage module;
the sending module is used for sending a writing record information obtaining request to the monitoring module;
the receiving module is used for receiving the write-in record information feedback sent by the monitoring module; the write record information feedback comprises write record information corresponding to the write operation;
and the second determining module is used for determining the state information of the write operation according to the write record information and the preset error threshold information.
10. The apparatus according to claim 9, wherein the write record information includes a number of erroneous recording pieces and/or a total number of write recording pieces;
the preset error threshold information comprises a preset error record number threshold and/or a preset error record proportion threshold.
11. The apparatus of claim 10,
the second determining module is configured to determine a current error record ratio according to the number of error records and the total number of write records;
and determining the state information of the write operation according to the current error record occupation ratio and the preset error record occupation ratio threshold.
12. The apparatus of claim 9, wherein the write operation comprises a plurality of write tasks;
and the acquisition module is used for acquiring the first identification information of the write operation and the second identification information of each write task corresponding to the write instruction when the data write module is detected to respond to the write instruction.
13. The apparatus according to claim 12, wherein the write log information feedback comprises the write log information corresponding to each write task;
a second determining module, configured to determine, based on the first identification information and the second identification information of each write task, preset error threshold information corresponding to each write task from the storage module;
and determining the state information and the write failure task set corresponding to the write operation according to the preset error threshold information corresponding to each write task and the write record information corresponding to each write task.
14. The apparatus of claim 12, wherein each write task comprises a plurality of write subtasks;
the obtaining module is configured to obtain, when it is detected that the data writing module responds to a write instruction, first identification information of the write job, the second identification information of each write task, and the third identification information of each subtask, which correspond to the write instruction.
15. The apparatus according to claim 14, wherein the write log information feedback comprises the write log information corresponding to each write subtask;
the second determining module is configured to determine, from the storage module, preset error threshold information corresponding to each writing subtask based on the first identification information, the second identification information of each writing task, and the third identification information of each writing subtask;
and determining the state information, the write failure task set and the write failure subtask set corresponding to the write operation according to the preset error threshold information corresponding to each write subtask and the write record information corresponding to each write subtask.
16. The apparatus of claim 11,
the second determining module is configured to determine that the status information of the write operation is a write failure if the current error record occupancy is greater than the preset error record occupancy threshold;
and if the current error record proportion is less than or equal to the preset error record proportion threshold, determining that the state information of the write-in operation is write-in success.
17. An electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the method for determining status information of a write job of any one of claims 1-8.
18. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of determining status information of a write job according to any one of claims 1 to 8.
CN202111047428.8A 2021-09-07 2021-09-07 Method and device for determining status information of write operation and storage medium Pending CN113961383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111047428.8A CN113961383A (en) 2021-09-07 2021-09-07 Method and device for determining status information of write operation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111047428.8A CN113961383A (en) 2021-09-07 2021-09-07 Method and device for determining status information of write operation and storage medium

Publications (1)

Publication Number Publication Date
CN113961383A true CN113961383A (en) 2022-01-21

Family

ID=79460903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111047428.8A Pending CN113961383A (en) 2021-09-07 2021-09-07 Method and device for determining status information of write operation and storage medium

Country Status (1)

Country Link
CN (1) CN113961383A (en)

Similar Documents

Publication Publication Date Title
US10552301B2 (en) Completing functional testing
US7840787B2 (en) Method and apparatus for non-deterministic incremental program replay using checkpoints and syndrome tracking
CN108427616B (en) Background program monitoring method and monitoring device
US20040078697A1 (en) Latent fault detector
CN111930489B (en) Task scheduling method, device, equipment and storage medium
CN112650676A (en) Software testing method, device, equipment and storage medium
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN111679976A (en) Method and device for searching page object
CN109542341B (en) Read-write IO monitoring method, device, terminal and computer readable storage medium
CN112181853A (en) Program debugging method, device and system
CN109358813B (en) Capacity expansion method and device for distributed storage system
CN113961383A (en) Method and device for determining status information of write operation and storage medium
CN110825427A (en) Code management method, device, server and storage medium
CN115617668A (en) Compatibility testing method, device and equipment
CN114330278A (en) Method and equipment for judging consistency of returned data
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN113518974A (en) System and method for finding and identifying computing nodes in a network
US11762727B2 (en) Information processing apparatus and method of monitoring operation
CN113961336A (en) Method and device for determining target reading frequency of operation and storage medium
US11113179B2 (en) Information processing device, information processing method, and computer readable medium for a trace process
CN115640236B (en) Script quality detection method and computing device
CN111241437B (en) Data processing method, device, server side and storage medium
CN117056313A (en) Memory database transaction management method and device, electronic equipment and medium
CN118035072A (en) Automatic acceptance method and system based on multi-version upgrading
WO2022086549A1 (en) Integration tests using mocked results from recorded unit test scenarios

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination