WO2017114213A1 - 一种分布式存储系统升级方法和装置 - Google Patents

一种分布式存储系统升级方法和装置 Download PDF

Info

Publication number
WO2017114213A1
WO2017114213A1 PCT/CN2016/110722 CN2016110722W WO2017114213A1 WO 2017114213 A1 WO2017114213 A1 WO 2017114213A1 CN 2016110722 W CN2016110722 W CN 2016110722W WO 2017114213 A1 WO2017114213 A1 WO 2017114213A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
data server
state
feedback information
data
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.)
Ceased
Application number
PCT/CN2016/110722
Other languages
English (en)
French (fr)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to EP16881002.6A priority Critical patent/EP3399692B1/en
Priority to US15/781,617 priority patent/US10884623B2/en
Priority to JP2018529541A priority patent/JP6763580B2/ja
Publication of WO2017114213A1 publication Critical patent/WO2017114213A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Definitions

  • the present application relates to the field of distributed computer technologies, and in particular, to a distributed storage system upgrade method and a distributed storage system upgrade device.
  • Distributed storage systems consist of distributed data servers that provide high reliability of data and high availability of access. High reliability is achieved through data redundancy and multiple backup or erasure codes; high availability is achieved through fast exception handling and failover. To upgrade a distributed storage system, you need to restart each data server of the system to complete the version update.
  • the upper layer service is shut down, and the entire distributed storage system is stopped. All the data servers of the distributed storage system are restarted and upgraded, and after all the data servers are upgraded, the upper layer service is restored.
  • the upper-layer service is not stopped, each data server is restarted in a round-robin manner, and the client sends a write request to multiple (the plurality of data servers that need to be backed up by default) to write to the data server to be written. Data, if the request fails, the client retries to the above data server to ensure that the client's access continues.
  • the retry strategy Will greatly affect the response time of the server.
  • each data server is restarted in a round robin manner, and the client sends a write request to multiple (the plurality of data servers that need to be backed up by default) to write to the data server to be written. Data if the request fails, the client ignores these data servers for Retry to ensure that client access continues.
  • the client temporarily ignores the data server that failed the request, and the distributed storage system continues the round-up upgrade of these data servers. If the data server in the distributed storage system is restarted too fast, and if the client only writes successfully to one data server, and only one data server writes successfully, if the disk or machine of the data server is damaged when it happens to rotate, due to The data to be written by the client is not written to other data servers, which will result in the loss of user data. Even if the rotation restart time is extended, the large cluster of the distributed storage system will have unexpected disk and machine anomalies when it is rotated for a long time, or it will generate a case where only one data server is successfully written to the client data, so that the user The data is at great risk of loss. Therefore, although this solution solves the delay problem, the reliability of the data is insufficient.
  • embodiments of the present application have been made in order to provide a distributed storage system upgrade method and a corresponding distributed storage system upgrade apparatus that overcome the above problems or at least partially solve the above problems.
  • the present application discloses a method for upgrading a distributed storage system, which should
  • For the client including:
  • the first feedback information is sent to each data server that successfully writes
  • the second feedback information is sent to each data server that successfully writes
  • the first feedback information or the second feedback information is used by the data server to determine itself.
  • the state includes an upgradeable state and a non-upgradeable state; the state of the data server is used by the upgrade control server to notify the data server to perform an upgrade operation in a round robin manner.
  • the application also discloses a method for upgrading a distributed storage system, which is applied to a data server, and includes:
  • the first feedback information or the second feedback information sent by the client is successfully written after the client sends a write request to the multiple data servers for the same data to be written. The number of comparisons with the specified number is obtained;
  • the state includes an upgradeable state and a non-upgrade state; the state is for the upgrade control server to rotate The way to choose to notify the data server to perform the upgrade operation.
  • the application also discloses a method for upgrading a distributed storage system, which is applied to an upgrade control server, and includes:
  • each data server has a state; and the state of the data server is determined according to the first feedback information or the second feedback information; After the feedback information or the second feedback information is sent to the plurality of data servers by the client for the same data to be written, the comparison result of the number of successful writes and the specified number is obtained;
  • the application also discloses a distributed storage system upgrade device, which is applied to a client, and includes:
  • a request sending module configured to send a write request to the plurality of data servers for the same data to be written
  • a determining module configured to receive a response returned by each data server, and determine, according to the response, whether the number of successful writes is greater than a specified number
  • a first feedback module configured to write to each write if the number of successful writes is greater than a specified number
  • the successful data server sends the first feedback information
  • a second feedback module configured to: if the number of successful writes is not greater than the specified number, send second feedback information to each successfully written data server; wherein the first feedback information or the second feedback information
  • the data server determines its own state; the state includes an upgradeable state and a non-upgradeable state; and the state of the data server is used by the upgrade control server to notify the data server to perform an upgrade operation in a round robin manner.
  • the application also discloses a distributed storage system upgrading device, which is applied to a data server, and includes:
  • a feedback information receiving module configured to receive first feedback information or second feedback information sent by the client; the first feedback information or the second feedback information is sent to the multiple data servers according to the client to write the same data to be written After the request, the comparison between the number of successful writes and the specified number is obtained;
  • a state determining module configured to determine a state of the data server itself according to the first feedback information or the second feedback information if the user is not upgraded; the state includes an upgradeable state and a non-upgradeable state; The upgrade control server selects to notify the data server to perform an upgrade operation in a round robin manner.
  • the application also discloses a distributed storage system upgrading device, which is applied to an upgrade control server, and includes:
  • a state obtaining module configured to acquire a state of each data server; the state includes an upgradeable state and a non-upgradeable state, each data server has a state; and the state of the data server is based on the first feedback information or the second feedback The information is determined; the first feedback information or the second feedback information is obtained after the client sends a write request to the plurality of data servers for the same to-be-written data, and the number of successful writes is compared with the specified number;
  • an upgrade notification module configured to notify at least one data server in an upgradeable state to perform an upgrade operation in a round robin manner; and the data server performs an upgrade operation according to the notification.
  • each client after the upgrade process is started in the distributed storage system, for the client accessing the distributed storage system, each client sends the data to be written to the same data to the same data to be written to the data server.
  • Write request then analyze how many data servers successfully write the data to be written, determine whether the number of successful writes is greater than a specified number, and send the first feedback to each data server that successfully writes according to the judgment result.
  • Information or second feedback information For the data server, according to the received first feedback information or the second feedback information, it is determined whether the user is in an upgradeable state or in a non-upgradeable state.
  • the upgrade control server the data server can be selectively notified to perform the upgrade operation in a round robin manner according to the state of the data server.
  • the upgrade control server controls each data server to perform the upgrade in a round robin manner
  • the state of the data server is controlled by the client, and the data to be written by any client is guaranteed to be written at least.
  • the number of data servers is used for backup. Therefore, when the upper layer service is not stopped, the distributed storage system can ensure the response time of the client is low, the reliability of the data is improved, and the user data loss is greatly reduced. risk.
  • FIG. 1 is a flow chart of steps of an embodiment of a method for upgrading a distributed storage system on the client side of the present application
  • FIG. 2 is a flow chart showing the steps of an embodiment of a method for upgrading a distributed storage system on the data server side of the present application
  • FIG. 3 is a flow chart showing the steps of an embodiment of a method for upgrading a distributed storage system on the upgrade control server side of the present application;
  • FIG. 4 is a flow chart of steps of an embodiment of a distributed storage system upgrade system according to the present application.
  • FIG. 5 is a structural block diagram of an embodiment of a distributed storage system upgrading apparatus on the client side of the present application
  • FIG. 6 is a structural block diagram of an embodiment of a distributed storage system upgrading apparatus on the client side of the present application
  • FIG. 7 is a structural block diagram of an embodiment of a distributed storage system upgrading apparatus on a data server side of the present application
  • FIG. 8 is a structural block diagram of an embodiment of a distributed storage system upgrading apparatus on an upgrade control server side of the present application
  • FIG. 8A is an architectural example of a distributed storage system according to an embodiment of the present application.
  • One of the core concepts of the embodiments of the present application is that creative changes are made to the data server and the upgrade control server of the distributed storage system, and new execution logic is also provided for the client accessing the data server.
  • the upgrade storage system starts the upgrade process, for the client accessing the distributed storage system, for the client accessing the distributed storage system, each client sends the same data to be written to multiple data servers simultaneously.
  • a write request for the data to be written and then analyzing how many data servers are successfully written to the data to be written, determining whether the number of successful writes is greater than a specified number, and successfully writing the data according to the determination result.
  • the server sends the first feedback information or the second feedback information.
  • the data server For the data server, according to the received first feedback information or the second feedback information, it is determined whether the user is in an upgradeable state or in a non-upgradeable state. For the upgrade control server, the data server can be selectively notified to perform the upgrade operation in a round robin manner according to the state of the data server.
  • the upgrade control server upgrades the data server that controls the upgradeable state in a round robin manner, the state of the data server is controlled by the client, and the data to be written by any client is guaranteed to be written to at least a specified number.
  • the data server is used for backup.
  • the distributed storage system can ensure the response time of the client is low, the reliability of the data is improved, and the risk of user data loss is greatly reduced. And can not tolerate unexpected machine anomalies during the upgrade process to ensure that the service is not affected.
  • the embodiment of the present application is applied to the client side.
  • FIG. 1 a flow chart of steps of an embodiment of a method for upgrading a distributed storage system of the present application is shown, which may specifically include the following steps:
  • Step 110 Send a write request to the plurality of data servers for the same data to be written.
  • the client A for a client A, during the upgrade process of the distributed storage system, when the client writes the data to be written A1 to the data server, the client A sends the data to the multiple data servers. A write request for the data A to be written.
  • the number R of the plurality of data servers may be preset.
  • the specific number of R is not limited by the embodiment of the present application.
  • the data to be written it can send a write request to the R data server, and then proceeds to step 120.
  • the client A may first send R write requests to the dispatch server of the distributed storage system, and then the dispatch server controls which R data servers are allocated to the R write requests.
  • R data servers for data to be written
  • the respective R data servers may be the same or different.
  • steps 101-102 are further included:
  • Step 101 Receive a second upgrade notification sent by the data server when accessing a data server.
  • Step 102 Enter an upgrade preparation state according to the second upgrade notification.
  • the upgrade control server of the distributed storage system first notifies each data server to enter an upgrade preparation state. Then, each data server can send a second upgrade notification to the client accessing the data server, so that the client enters the upgrade preparation state.
  • the data server After accessing a data server in the upgrade preparation state, the data server returns a second upgrade notification to the client. After receiving the second upgrade preparation notification, the client enters the upgrade preparation state according to the second upgrade preparation notification.
  • the application can transmit an upgrade script to the browser through the webpage opened by the browser, and the browser can receive the script after receiving the script. Execute the script to put the client into the upgrade preparation state. If the client accesses the data server through the Alipay APP, the application may add the upgrade processing logic to the APP in advance. After receiving the second upgrade notification, the APP enables the upgrade processing logic to enable the client to enter the upgrade preparation state. . Certain embodiments of the present application are not limited thereto.
  • the steps performed by the client side such as steps 110, 120, 130, and 140 of the embodiment of the present application, may be entered.
  • Step 120 Receive a response returned by each data server, and determine, according to the response, whether the number of successful writes is greater than a specified number; if the number of successful writes is greater than a specified number, proceed to step 130; if the write succeeds If the number is not greater than the specified number, the process proceeds to step 140.
  • each data server under normal circumstances, after receiving the write request sent by the client for the same data to be written, each data server returns a response to the client accordingly. Of course, if a data server is being upgraded or crashed, it will not return a response to the client.
  • the client may periodically check the received response. For example, periodically check whether the response of the data server or some of the data servers is received. If the response of one or several data servers is not received within the specified time period, it indicates that the data A1 to be written is not successfully written into the one or several data servers.
  • a response is received from one or several data servers within a specified time period, you can analyze whether the response is a write success response or a write failure response; if it is a write success response, the write success response The backup of the corresponding data server to write data A1 is successful, that is, the write succeeds; if it is a write failure response, it indicates that the backup of the data response server corresponding to the write failure response fails, that is, the write fails.
  • the client A periodically checks whether the M is greater than N.
  • the period is, for example, 1 ms (microseconds). Of course, the period can be set as needed, and the present application does not limit it.
  • the present application can count the number of successful write data A1 to the data server based on the above judgment.
  • a specified number of successful writes may be preset, and the specified number is the lowest number of successful writes, and may also be understood as the number of data servers in which a client's data to be written is successfully backed up.
  • the specified number is N, and the N ⁇ R, N, and R are positive integers.
  • the values of N and R can be set according to actual requirements, which is not limited in this application.
  • the R data servers can be distributed in different racks to further improve the disaster recovery backup effect.
  • the R data servers are completely distributed across different racks.
  • Step 130 Send first feedback information to each data server that successfully writes.
  • the client's write request can be successfully received and the data to be written is backed up, it means that the M data servers are available. Then the client can send a first feedback message to the M data servers.
  • the first feedback message may be an OK message that tells the data server to set its own state to an upgradable state.
  • the actual data server sets its own state to an upgradeable state according to the first feedback message. This application is described in detail in Embodiment 2.
  • Step 140 Send second feedback information to each data server that successfully writes.
  • the first feedback information or the second feedback information is used by the data server to determine its own state; the state includes an upgradeable state and a non-upgradeable state; and the state of the data server is notified by the upgrade control server in a round robin manner
  • the data server performs an upgrade operation.
  • the client can send a second feedback message to the M data servers.
  • the second feedback message may be a HOLD heartbeat message, which tells the data server that it can set its own state to a non-upgradeable state.
  • the actual data server sets its own state according to the second feedback message to a non-upgrade state. This application is described in detail in Embodiment 2.
  • the client resends the write request to the new data server until the guarantee M is at least equal to N.
  • the data server For each un-upgraded data service in the distributed storage system, after receiving the first feedback information or the second feedback information, it may determine that it is in an upgradeable state according to the first feedback information or the second feedback information. Still in a non-upgradeable state. Among them, the upgradeable status is OK, and the non-upgrade status is HOLD. For example, if a data server receives a second feedback message, the data server can set its own state to a non-upgradeable state. If a data server receives the first feedback, it can set its own state to an upgradeable state.
  • the upgraded data server may exist in the above R data servers. Then, for the upgraded data server, any of the above feedback information received will not be further processed, and its status remains in the upgraded state.
  • each data server may be notified by the upgrade control server in a round robin manner to perform the upgrade operation.
  • the upgrade control server notifies the data server to perform the upgrade operation in a round robin manner, the present application is described in the third embodiment.
  • step 140 includes sub-steps 141-144:
  • Sub-step 141 if the number of successful writes is equal to the specified number, the second feedback information is sent to each data server that successfully writes.
  • Sub-step 142 if the write succeeds less than the specified number, send a write request to the at least one data server except the plurality of data servers for the data to be written.
  • Sub-step 143 Receive a response returned by the at least one data server, and determine whether the number of successful current writes is equal to a specified number according to the number of successfully written. If the current number of successful writes is equal to the specified number, then enter sub-step 144; if the current number of successful writes is less than the specified number, then proceeds to sub-step 142;
  • Sub-step 144 if the number of successful current writes is equal to the specified number, the second feedback information is sent to each data server that successfully writes.
  • the client A treats the data A1 to be written to the R data servers for the first time, if the number of successful responses M ⁇ N is monitored, the writes are sent to at least the NM data servers again. request.
  • the second feedback information is then sent to each data server that has successfully written.
  • the backup data of the client to be backed up can be successfully backed up in multiple databases without affecting the normal use of the upload service.
  • step 150 is further included:
  • Step 150 When new data to be written occurs, the data server includes a plurality of data servers including the previously successfully written data server, and proceeds to step 120.
  • U10...U10 These 10 data servers sent write requests. Only U1 and U2 write successfully. Then, a write request is sent to U11 and U12 for the second time. U11 writes successfully. Then, for the client to write data A2. , you can select 10 data servers U1, U2, U11, U4, U5...U10, send write requests to these 10 data servers, of course, you can also choose to include U1, U2, U11 and another data server. Data servers.
  • the OK message can be sent to each data server that has successfully written, and the data server can determine whether to modify the state according to the OK message. It is upgradeable.
  • the client can write the data to be written to the same R data server as the last time in the case of M ⁇ N, to actively update the state of the data server, and the time when the data server is in the non-upgrade state can be reduced. .
  • the first feedback information and the second feedback information include a client identifier.
  • the first identifier information and the second feedback information include the client identifier “client A”.
  • the first feedback information or the second feedback information for the data server to determine its own state includes:
  • the second feedback information is used by the data server to write the client identifier in the second feedback information to the non-upgrade list after the second feedback information is received, and mark the state of the client as a non-upgrade state;
  • a non-upgrade list is set on the data server side.
  • client A after the data server receives the second feedback information of client A, it sets its own state to a non-upgradeable state, and writes the client A to the non-upgradable list.
  • the first feedback information is used by the data server to delete the client identifier in the first feedback information from the non-upgradable list after receiving the first feedback information, and mark the status of the client identifier after determining that the non-upgradable list is empty. Upgradeable status.
  • new data to be written appears to include multiple data servers of the previously successfully written data server. For the object. Then, for the data server that receives the second feedback message sent by the client A, the subsequent message is also received by the client A. Then, when the data server continues to receive the message of the client A as the first feedback message, the record of the client A can be deleted from the non-upgradable list.
  • the data server receives the first feedback message of a certain client, and the non-upgradable list may not record the corresponding client identifier, and the deletion process is not performed.
  • the data server determines that the non-upgradeable list is empty, it sets its own state to an upgradeable state.
  • the client may also receive an exit notification sent by the data server to exit the upgrade preparation state, and exit the upgrade preparation state according to the exit notification.
  • the client then sends a write request to the data server in accordance with the normal request dispatch logic.
  • a method for upgrading a distributed storage system of the present application is introduced from a client side, so that each client sends the data to be written to the plurality of data servers simultaneously for the same data to be written.
  • Write a request and then analyze how many data servers are successfully written, determine whether the number of successful writes is greater than a specified number, and send first feedback information or second feedback to each successfully written data server according to the determination result.
  • the first feedback information is used by the data server to delete the client identifier in the first feedback information from the non-upgradable list after receiving the first feedback information, and mark the status of the client after determining that the non-upgradable list is empty. It is upgradeable. .
  • the upgrade control server controls each data server to perform the upgrade in a round robin manner
  • the state of the data server is controlled by the client, and the data to be written by any client is guaranteed to be written to a specified number at least.
  • the data server is used for backup. Therefore, when the upper layer service is not stopped, the distributed storage system can ensure the response time of the client is low, the reliability of the data is improved, and the risk of user data loss is greatly reduced.
  • the embodiment of the present application is applied to the data server side of the distributed storage server.
  • FIG. 2 a flow chart of steps of an embodiment of a method for upgrading a distributed storage system according to the present application is shown, which may specifically include the following steps:
  • Step 210 Receive first feedback information or second feedback information sent by the client.
  • the first feedback information or the second feedback information is sent after the client sends a write request to the multiple data servers according to the same to-be-written data. The comparison between the number of successful entries and the specified number is obtained.
  • the client sends a write request to the R data servers for the data A1 to be written
  • the data is sent to the M data.
  • the server sends a first feedback message; when M is equal to N, a second feedback message is sent to the M data servers.
  • M ⁇ N sending a write request to the at least one data server except the plurality of data servers for the data to be written A1, and then receiving the response returned by the at least one data server, and combining the successfully written
  • Embodiment 1 for the specific process of returning the first feedback information and the second feedback information by the client, and details are not described herein.
  • each data server of the distributed storage system may receive the first feedback information returned by each client, such as an OK message. It is also possible to receive a second feedback message returned by each client, such as a HOLD message.
  • the method further includes:
  • Step 201 Receive a first upgrade notification sent by the upgrade control server.
  • Step 202 Enter an upgrade preparation state according to the first upgrade notification, and send a second upgrade notification to the client after receiving the access request of the client, so that the client enters an upgrade preparation state.
  • the upgrade control server of the distributed storage system first sends a first upgrade notification to each data server, and the corresponding data server receives the first upgrade notification, and then enters the upgrade preparation state according to the first upgrade notification.
  • the data server accessing the upgrade preparation state returns a second upgrade notification to the client.
  • the client is based on the first
  • the second upgrade notification enters the upgrade preparation state.
  • the steps executed by the data server side such as steps 210 and 220 of the embodiment of the present application, may be entered.
  • Step 220 Determine, according to the first feedback information or the second feedback information, the state of the data server itself, if the user is not upgraded; the state includes an upgradeable state and a non-upgradeable state.
  • the state is used by the upgrade control server to notify the data server to perform an upgrade operation in a round robin manner.
  • each data server is not upgraded. As some data servers continue to complete the upgrade process, these data servers will be in an upgraded state. For example, the successfully upgraded data server sets its own state to DONE. At this time, the successfully upgraded data server also receives the first. A feedback information or a second feedback information, but it does not process the first feedback information or the second feedback information again, and its state remains in an upgraded state.
  • Only the data server in the unupgraded state determines the state of the data server itself according to the first feedback information or the second feedback information.
  • the upgrade status is still not upgradeable.
  • the upgradeable status is OK
  • the non-upgrade status is HOLD.
  • a data server receives a second feedback message
  • the data server can set its own state to a non-upgradeable state. If a data server receives the first feedback, it can set its own state to an upgradeable state.
  • the first feedback information and the second feedback information include a client identifier.
  • step 220 includes sub-steps 221-222:
  • Sub-step 221 when receiving the second feedback information, writing the client identifier in the second feedback information to the non-upgradable list, and marking the status of the user as a non-upgradeable state;
  • a non-upgradable list is preset in each data service, and is used to record information such as a client identifier that sends a HOLD message.
  • the HODL message includes a HOLD command and a client identifier.
  • the M data servers receive the HOLD message, the client A is recorded in the non-upgradable list.
  • the current time can also be recorded.
  • the non-upgrade list can record only one client identifier of the corresponding client, and can also record the client identifiers of multiple corresponding clients.
  • the non-upgrade list can record only one client identifier of the corresponding client, and can also record the client identifiers of multiple corresponding clients.
  • only one client identifier may be recorded, and then the time of each time is recorded in the time field.
  • the status of the data server itself is also changed to the HOLD state, indicating that the data service is not upgradeable.
  • sub-step B21 is further included:
  • Sub-step B21 determining, for the client identifier in the non-upgrade list, whether the second feedback message of the corresponding client is not received within a specified number of time periods, if the corresponding client is not received within the specified number of time periods
  • the second feedback message of the terminal deletes the client identifier from the non-upgradable list.
  • the embodiment of the present application may set a time period T1 in advance. For the client corresponding to the client identifier in the non-upgradable list, if the data server specifies that the HOLD message sent by the client is not received again, the data server may not be upgraded in the list. The client ID record is deleted.
  • This step prevents the data server from being in a non-upgradeable state after it is in a non-upgradeable state.
  • Sub-step 222 receiving the first feedback information, deleting the client identifier in the first feedback information from the non-upgradable list, and marking the state of the self-upgradable state after determining that the non-upgradable list is empty.
  • the foregoing data server U1 receives the OK message sent by the client A again, and deletes the record of the client A from the first table.
  • the data server deletes all the records in Table 1, when Table 1 is empty, it sets its own state to an upgradeable state.
  • sub-step 222 includes sub-steps B11-B14:
  • Sub-step B11 determining whether the non-upgradable list has a client identifier in the first feedback information; if the non-upgradable list has a client identifier in the first feedback information, proceeding to sub-step B12.
  • Sub-step B12 the client identifier is deleted from the non-upgrade list.
  • a data server may be allocated to different clients for use, it may receive first feedback information of different clients, and then, for the received first feedback information of a certain client, determine whether the non-upgradable list has a client identifier of the first feedback information, where the non-upgradable list has a client identifier of the first feedback information, and the client is The end identifier is deleted from the non-upgradable list; if the non-upgradable list does not have the client identifier of the first feedback information, the subsequent operation may not be performed.
  • the client identifier may be matched with the client identifier of the first table, and the client A is found. Then clear the record of client A. If the Ok message sent by the client C is received and it is found that there is no record in the table 1, no operation is performed.
  • Sub-step B13 it is judged whether the non-upgradable list is empty; if the non-upgradable list is empty, then the sub-step B14 is entered. If the non-upgradeable list is not empty, then keep its own state as non-upgradeable.
  • Sub-step B14 the status of the tag itself is an upgradeable state.
  • non-upgradeable list is not empty, then it maintains its own non-upgradeable state.
  • the OK message sent by the client A is received first, the record of the client A is cleared, and if the table 1 is still not empty, the HOLD state is continued. If the OK message of the client B is received again, the record of the client B in the table 1 is deleted in the sub-step 221, and when the judgment table 1 is empty, the data server U1 modifies its HODL state to the OK state. Indicates that data server U1 can be upgraded.
  • the upgrade control server may select to notify the data server to perform an upgrade operation in a round robin manner according to the state of each data server.
  • the process of upgrading the control server to specifically control each data service upgrade may refer to the description in the third embodiment.
  • the data server may also upgrade the exit notification of the exit upgrade preparation state sent by the control server, and exit the upgrade preparation state according to the exit notification, and send an exit notification to the client according to the exit notification, so that the client The terminal exits the upgrade preparation state.
  • the data server then processes the client's write request in accordance with normal processing logic.
  • a method for upgrading a distributed storage system of the present application is introduced from a data server side, and for a data server, according to a first feedback sent by a received client
  • the information or the second feedback information determines whether it is in an upgradeable state or in a non-upgradeable state.
  • the first feedback information or the second feedback information is obtained according to a comparison result between the number of successful writes and a specified number after the client sends a write request to the plurality of data servers for the same data to be written;
  • the upgradeable state and the non-upgradeable state are included; the state is selected by the upgrade control server to notify the data server to perform an upgrade operation in a round robin manner.
  • the client controls the state of the data server, and ensures that the data to be written by any client is written to at least a specified number of data servers for backup, and when the upgrade control server controls each data server to perform the upgrade in a round robin manner,
  • the distributed storage system can ensure the response time to the client is low, the reliability of the data is improved, and the risk of user data loss is greatly reduced.
  • FIG. 3 a flow chart of steps of an embodiment of a method for upgrading a distributed storage system of the present application is shown, which may specifically include the following steps:
  • Step 310 Obtain a state of each data server; the state includes an upgradeable state and a non-upgradeable state, and each data server has a state; and the state of the data server is determined according to the first feedback information or the second feedback information; The first feedback information or the second feedback information is obtained after the client sends a write request to the plurality of data servers for the same data to be written, and the number of successful writes is compared with the specified number.
  • each data server in the distributed storage system can determine the status according to the first feedback message and/or the second feedback message fed back by the client, and the status includes the upgradeable state and the non-upgradeable state. status.
  • each data server can only have one state at a time. For example, if a data server is in an upgradeable state, it cannot have other states. Other situations are similar and will not be described here.
  • the upgrade control server of the embodiment of the present application can obtain the status of each data service.
  • the specific manner of obtaining the state of the data service of the upgrade control server may be various, and is not limited by the embodiment of the present application.
  • Step 320 Notify at least one data server in an upgradeable state to perform an upgrade operation in a round robin manner; and the data server performs an upgrade operation according to the notification.
  • the upgrade control server may control the data server in the upgradeable state to perform an upgrade operation by using a rotation manner.
  • the batch of data servers is notified to perform the upgrade operation. After the batch of data servers receives the upgrade notification, they can restart the upgrade.
  • step 320 includes sub-steps 321-322:
  • the upgrade control server can select K data servers from each time, and notify them to perform an upgrade operation, for example, selecting three.
  • K is an integer greater than zero.
  • K can be set according to actual needs, and this application does not limit it.
  • Sub-step 322 monitoring whether the at least one data server in the upgradeable state performs the upgrade operation; if the at least one data server in the upgradeable state all performs the upgrade operation, proceed to sub-step 321;
  • the upgrade control server notifies the foregoing data servers U1, U2, and U3 to perform an upgrade operation, the data servers U1, U2, and U3 restart the upgrade. After the data server is successfully upgraded, you can modify its own status to an upgraded state, such as DONE.
  • the upgrade control server can monitor whether the status of these data servers is DONE. If it is not DONE, the upgrade is successful.
  • the upgrade control server monitors whether the data server upgrade succeeds or fails.
  • the upgrade failure can be determined by, for example, a machine restart failure, and the system version is unchanged after the restart.
  • upgrade operations include successful upgrade and upgrade failure. All upgrade operations include: all data servers are successfully upgraded; if some data servers are successfully upgraded, the remaining data servers fail to be upgraded.
  • the upgrade control server monitors that the data server that notified the upgrade all performs the upgrade operation, the next batch of upgraded data servers can be rotated and selected from the data server in the upgradeable state.
  • the method further includes:
  • the upgrade control server adds the data server to the upgrade blacklist and suspends the upgrade of the data server. Have these data servers wait for offline or manual repair.
  • the multiple data servers in the embodiment of the present application may be distributed on at least two racks.
  • each data server of the distributed storage system is distributed in multiple racks, and one rack is a data server. Subcluster.
  • step 320 includes sub-step C11:
  • Sub-step C11 each time selecting the rack with the largest data server in the upgradeable state, notifying the data server in the rack to perform an upgrade operation; each data server in the rack checks its own state according to the notification. If it is in an upgradeable state, restart the upgrade. If it is in a non-upgradeable state or upgraded state, it refuses to restart the upgrade.
  • each rack may have a data server in an upgradeable state, or a data server in a non-upgradable state, or an upgrade may exist.
  • the completed data server since the data server is placed in the form of a rack, one rack is placed A batch of data servers has been set up. For a large number of clients, it is possible to access different data servers in different racks, so that each rack may have a data server in an upgradeable state, or a data server in a non-upgradable state, or an upgrade may exist. The completed data server.
  • the embodiment of the present application sends an upgrade notification in a rack unit, for example, the IP segment of a rack is 200.200.200.***, and the upgrade control server of the embodiment of the present application needs Generate a notification for 200.200.200.***, broadcast to the rack, the data server of the rack can receive the notification.
  • the rack with the most data servers in the OK state is selected, and the upgrade notification is sent to the rack.
  • K data servers can be selected from each time, and the upgrade operation is notified, for example, three are selected.
  • sub-step C12 is further included:
  • Sub-step C12 monitoring whether the data servers in the rack all perform the upgrade operation; if the data servers in the rack all perform the upgrade operation, proceed to sub-step C11.
  • the next rack can be selected, and the upgrade notification is sent to the data server of the next rack. This cycle until all data servers have been upgraded.
  • the upgrade control server monitors the data server except the upgrade failed, after all the data servers are upgraded, the data server can be notified to exit the upgrade preparation state, return to the normal processing logic, and each data server notifies the access.
  • the client of the data server exits the upgrade preparation state, and the client returns to the normal processing logic, and steps 310 and 320 are not executed.
  • a method for upgrading a distributed storage system of the present application is introduced from an upgrade control server side, and the upgrade control server controls the data server in an upgradeable state in a round robin manner, because the client controls The status of the data server, and ensure that the data to be written by any client is written to at least the specified number of data servers for backup, so that the response time of the distributed storage system to the client can be guaranteed without stopping the upper layer service.
  • the upgrade control server controls the data server in an upgradeable state in a round robin manner, because the client controls The status of the data server, and ensure that the data to be written by any client is written to at least the specified number of data servers for backup, so that the response time of the distributed storage system to the client can be guaranteed without stopping the upper layer service.
  • Lower it also improves the reliability of the data, greatly reducing the risk of user data loss; and can tolerate unexpected machine anomalies during the upgrade process to ensure that the service is not affected.
  • the upgrade time is fast, avoiding a large amount of data migration.
  • FIG. 4 a flow chart of steps of an embodiment of a method for upgrading a distributed storage system of the present application is shown, which may specifically include the following steps:
  • Step 410 The client sends a write request to the plurality of data servers for the same data to be written.
  • Step 412 The client receives the response returned by each data server, and determines whether the number of successful writes is greater than a specified number according to the response; if the number of successful writes is greater than the specified number, proceed to step 414; If the number of successful writes is not greater than the specified number, then step 416 is entered.
  • Step 414 The first feedback information is sent by the client to each data server that successfully writes.
  • Step 416 The second feedback information is sent by the client to each data server that is successfully written.
  • the first feedback information and the second feedback information include a client identifier.
  • Step 417 when new data to be written occurs, for the plurality of data servers including the data server that has been successfully written before, enter a step of sending a write request to the plurality of data servers for the same data to be written.
  • Step 418 Receive, by the data server, the first feedback information or the second reverse sent by the client. Feed information
  • Step 420 The data server determines, according to the first feedback information or the second feedback information, the state of the data server itself, where the data server is not upgraded; the state includes an upgradeable state and a non-upgrade state;
  • the step 420 includes sub-steps D11-D16:
  • Sub-step D11 when the second feedback information is received, the client identifier in the second feedback information is written into the non-upgradable list, and the status of the token is marked as a non-upgrade state;
  • Sub-step D12 determining, for the client identifier in the non-upgradable list, whether the second feedback message of the corresponding client is not received within a specified number of time periods; if the corresponding client is not received within the specified number of time periods The second feedback message of the terminal proceeds to sub-step D13. If the second feedback message of the corresponding client is not received within a specified number of time periods, the non-upgrade state is maintained.
  • Sub-step D13 the client identifier is deleted from the non-upgradable list. Go to substep D15.
  • Sub-step D14 determining whether the non-upgradable list has a client identifier in the first feedback information; if the non-upgradable list has a client identifier in the first feedback information, proceeding to sub-step D13. If the non-upgradable list does not have the client identifier in the first feedback information, proceed to sub-step D15
  • Sub-step D15 it is judged whether the non-upgradable list is empty; if the non-upgradable list is empty, then the sub-step D16 is entered.
  • Sub-step D16 the status of the tag itself is an upgradeable state.
  • Step 422 The status of each data server is obtained by the upgrade control server.
  • Step 424 The upgrade control server notifies at least one data server in an upgradeable state to perform an upgrade operation in a round robin manner;
  • Step 426 the data server performs an upgrade operation according to the notification.
  • the principle of the client side of the embodiment of the present invention can be referred to the description of the first embodiment and the principle of the data server.
  • the principle of the step of upgrading the control server can be referred to the third embodiment. description. I will not go into details here.
  • a method for upgrading a distributed storage system of the present application is introduced from three aspects of a client, a data server, and an upgrade control server.
  • each client is requested to write to the same data to be written, and simultaneously sends the write request to multiple data servers, and then analyzes how many data servers are successfully written. It is determined whether the number of successful writes is greater than a specified number, and the first feedback information or the second feedback information is sent to each data server that has successfully written according to the determination result.
  • the data server according to the received first feedback information or the second feedback information, it is determined whether the user is in an upgradeable state or in a non-upgradeable state.
  • the upgrade control server you can rotate the data server in the upgradeable state to perform the upgrade operation.
  • the upgrade control server upgrades the data server that controls the upgradeable state in a round robin manner, the state of the data server is controlled by the client, and the data to be written by any client is guaranteed to be written to at least a specified number.
  • the data server is used for backup, so that the distributed storage system can ensure the response time to the client is low, the reliability of the data is improved, and the risk of user data loss is greatly reduced without stopping the upper layer service; Unexpected machine anomalies during the upgrade process can be tolerated and the service is not affected.
  • FIG. 5 a structural block diagram of an embodiment of a distributed storage system upgrading apparatus of the present application is shown, which may specifically include the following modules:
  • the request sending module 510 is configured to send a write request to the plurality of data servers for the same data to be written.
  • the method before step 510, the method further includes:
  • the second upgrade notification receiving module is configured to receive a second upgrade notification sent by the data server when accessing a data server.
  • the second upgrade preparation module is configured to enter an upgrade preparation state according to the second upgrade notification.
  • the determining module 520 is configured to receive a response returned by each data server, and determine, according to the response, whether the number of successful writes is greater than a specified number.
  • the first feedback module 530 is configured to: if the number of successful writes is greater than the specified number, send the first feedback information to each data server that successfully writes.
  • the second feedback module 540 is configured to: if the number of successful writes is not greater than the specified number, send second feedback information to each successfully written data server; wherein the first feedback information or the second feedback information is used by The data server determines its own state; the state includes an upgradeable state and a non-upgradeable state; and the state of the data server is used by the upgrade control server to notify the data server to perform an upgrade operation in a round robin manner.
  • the second feedback module 540 includes:
  • the second feedback information sending submodule is configured to send the second feedback information to each data server that successfully writes if the number of successful writes is equal to the specified number.
  • a write request sending submodule configured to send, to the at least one data server other than the plurality of data servers, a write request for the to-be-written data if the write succeeds less than a specified number.
  • a judging sub-module configured to receive a response returned by the at least one data server, and determine whether the number of successful writes is equal to a specified number in combination with the number of successfully written; if the number of current writes is equal to the specified number The number enters the second feedback information sending sub-module.
  • the method further includes:
  • the new data to be sent sub-module is used to enter the request sending module when a new data to be written appears to be included in the data server including the data server that has been successfully written.
  • the first feedback information and the second feedback information include a client identifier
  • the first feedback information or the second feedback information for the data server to determine its status includes:
  • the second feedback information is sent by the data server after receiving the second feedback information
  • the client identifier in the second feedback information is written into the non-upgradable list and the state of the token itself is not upgradeable;
  • the first feedback information is used by the data server to delete the client identifier in the first feedback information from the non-upgradable list after receiving the first feedback information, and mark the status of the client identifier after determining that the non-upgradable list is empty. Upgradeable status.
  • FIG. 6 a structural block diagram of an embodiment of a distributed storage system upgrading apparatus of the present application is shown, which may specifically include the following modules:
  • the feedback information receiving module 610 is configured to receive first feedback information or second feedback information sent by the client, where the first feedback information or the second feedback information is sent to the multiple data servers according to the same data to be written by the client. After the request is entered, the number of successful writes is obtained from the comparison of the specified number.
  • the method before the feedback information receiving module 610, the method further includes:
  • the first upgrade notification receiving module is configured to receive the first upgrade notification sent by the upgrade control server.
  • the first upgrade preparation module is configured to enter an upgrade preparation state according to the first upgrade notification, and send a second upgrade notification to the client after receiving the access request of the client, so that the client enters an upgrade preparation state.
  • the status determining module 620 is configured to determine, according to the first feedback information or the second feedback information, the status of the data server itself, if the user is not upgraded; the status includes an upgradeable state and a non-upgradeable state; The status is for the upgrade control server to select to notify the data server to perform the upgrade operation in a round robin manner.
  • the state determining module 620 includes:
  • the upgradeable state determining submodule is configured to: when receiving the first feedback information, delete the client identifier in the first feedback information from the non-upgradable list, and determine that the non-upgradable list is empty Remember that its status is upgradeable.
  • the upgradeable state determining submodule comprises:
  • a client identifier determining sub-module configured to determine whether the non-upgradable list has a client identifier in the first feedback information; if the non-upgradable list has a client identifier in the first feedback information, enter The first delete submodule.
  • the first deletion submodule is configured to delete the client identifier from the non-upgradable list.
  • the non-upgrade list judging sub-module is configured to determine whether the non-upgradable list is empty; if the non-upgradable list is empty, enter the upgradeable status flag sub-module.
  • An upgradeable status tag submodule that marks the status of itself as an upgradable state.
  • the non-upgrade state determining sub-module is configured to, when receiving the second feedback information, write the client identifier in the second feedback information to the non-upgradable list, and mark the state of the self-upgradable state as a non-upgradeable state.
  • the method further includes:
  • the time judging sub-module is configured to determine, for the client identifier in the non-upgradable list, whether the second feedback message of the corresponding client is not received within a specified number of time periods, if not received within a specified number of time periods Go to the second deletion sub-module of the corresponding client, and enter the second deletion sub-module;
  • the second deletion submodule is configured to delete the client identifier from the non-upgradable list.
  • FIG. 7 a structural block diagram of an embodiment of a distributed storage system upgrading apparatus of the present application is shown, which may specifically include the following modules:
  • a state obtaining module 710 configured to acquire a state of each data server; the state includes an upgradeable state and a non-upgradeable state, each data server has a state; and the state of the data server is according to the first feedback information or the second The feedback information is determined; the first feedback information Or the second feedback information is obtained after the client sends a write request to the plurality of data servers for the same data to be written, and the number of successful writes is compared with the specified number.
  • the method before the state obtaining module 710, the method further includes:
  • the upgrade notification sending module is configured to send a first upgrade notification to each data server, so that each data server enters an upgrade preparation state, and each data server sends a second upgrade notification to the client after receiving the access request of the client, In order to make the client enter an upgrade preparation state.
  • the upgrade notification module 720 is configured to notify at least one data server in an upgradeable state to perform an upgrade operation in a round robin manner; and the data server performs an upgrade operation according to the notification.
  • the upgrade notification module includes:
  • a first selection submodule configured to notify the at least one data server in an upgradeable state to perform an upgrade operation each time at least one data server in an upgradeable state is selected;
  • a first monitoring submodule configured to monitor whether the at least one data server in an upgradeable state performs all the upgrade operations; if the at least one data server in the upgradeable state performs all the upgrade operations, enter the first selection Submodule.
  • the method further includes:
  • the data server is added to the upgrade blacklist, and the upgrade of the data server is suspended.
  • each data server is distributed on at least two racks; and the upgrade notification module 720 includes:
  • An upgrade notification sub-module configured to notify the data server in the rack to perform an upgrade operation each time the rack of the data server in the upgradeable state is selected at most; each data server in the rack checks the self according to the notification If the status is in an upgradeable state, the upgrade is restarted. If the status is not upgradeable or upgraded, the upgrade is refused.
  • the method further includes:
  • the monitoring submodule is configured to monitor whether the data servers in the rack all perform the upgrade operation; if the data servers in the rack all perform the upgrade operation, enter the upgrade notification submodule.
  • FIG. 8 and FIG. 8A are structural diagrams of an embodiment of a distributed storage system upgrade system of the present application, which may specifically include the following modules: a plurality of clients 810, a plurality of data servers 820, and an upgrade control server 830. .
  • FIG. 8A is a schematic structural diagram of a distributed storage system according to an embodiment of the present invention.
  • each client may send a write request to R in the distributed storage system, and the upgrade control server controls the upgrade process of all data servers.
  • FIG. 8 shows the connection relationship between the client 810, the data server 820, and the upgrade control server 830.
  • the client 810 includes:
  • the request sending module 811 is configured to send a write request to the plurality of data servers for the same data to be written;
  • the determining module 812 is configured to receive a response returned by each data server, and determine, according to the response, whether the number of successful writes is greater than a specified number;
  • the first feedback module 813 is configured to: if the number of successful writes is greater than the specified number, send the first feedback information to each data server that successfully writes;
  • the second feedback module 814 is configured to: if the number of successful writes is not greater than the specified number, send second feedback information to each successfully written data server;
  • the data server 820 includes:
  • the data storage module 821 is configured to receive a write request from the client and return a response to the client.
  • the feedback information receiving module 822 is configured to receive first feedback information or second feedback information sent by the client.
  • the state determining module 823 is configured to determine the state of the data server itself according to the first feedback information or the second feedback information if the user is not upgraded.
  • the upgrade module 824 is configured to perform an upgrade operation according to the notification of the upgrade control server.
  • the upgrade control server 830 includes:
  • a state obtaining module 831 configured to acquire a state of each data server
  • the upgrade notification module 832 is configured to notify at least one data server in an upgradeable state to perform an upgrade operation in a round robin manner.
  • module of the client of the embodiment of the present application refer to the description of the fifth embodiment.
  • module of the data server refer to the description of the sixth embodiment.
  • module of the upgrade controller refer to the description of the seventh embodiment. The principle is basically similar and will not be described here.
  • a method for upgrading a distributed storage system of the present application is introduced from three aspects of a client, a data server, and an upgrade control server.
  • each client is requested to write to the same data to be written, and simultaneously sends the write request to multiple data servers, and then analyzes how many data servers are successfully written. It is determined whether the number of successful writes is greater than a specified number, and the first feedback information or the second feedback information is sent to each data server that has successfully written according to the determination result.
  • the data server according to the received first feedback information or the second feedback information, it is determined whether the user is in an upgradeable state or in a non-upgradeable state.
  • the upgrade control server you can rotate the data server in the upgradeable state to perform the upgrade operation.
  • the upgrade control server upgrades the data server that controls the upgradeable state in a round robin manner, the state of the data server is controlled by the client, and the data to be written by any client is guaranteed to be written to at least a specified number.
  • the data server is used for backup, so that the distributed storage system can ensure the response time to the client is low, the reliability of the data is improved, and the risk of user data loss is greatly reduced without stopping the upper layer service; Unexpected machine anomalies during the upgrade process can be tolerated and the service is not affected.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory, such as read only memory (ROM) or flash memory (FLASH RAM), in a computer readable medium.
  • RAM random access memory
  • ROM read only memory
  • FLASH RAM flash memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include non-persistent computer readable media (TRANSITORY MEDIA), such as modulated data signals and carrier waves.
  • the embodiments of the present application refer to a method, a terminal device (system), and a method according to an embodiment of the present application.
  • a flowchart and/or block diagram of a computer program product is described. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申请实施例提供了一种分布式存储系统升级方法和装置,涉及分布式计算机技术领域。本申请的客户端对于同一个待写数据,同时向多个数据服务器发送写入请求,然后分析向多少个数据服务器中写入成功该待写数据,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。数据服务器则根据接收到的第一反馈信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。升级控制服务器可以根据数据服务器的状态以轮转的方式选择通知所述数据服务器进行升级操作,可以在不用停止上层服务的情况下,保证系统对客户端的响应时间较低,提高了数据的可靠性,降低了用户数据丢失的风险。

Description

一种分布式存储系统升级方法和装置 技术领域
本申请涉及分布式计算机技术领域,特别是涉及一种分布式存储系统升级方法和一种分布式存储系统升级装置。
背景技术
高可用的分布式存储系统是构建高可用服务的基石,分布式存储系统由分布式的数据服务器组成,它提供数据的高可靠性和访问的高可用性。其中高可靠性通过数据冗余多备份或纠删码实现;高可用性通过快速的异常处理和故障切换实现。对分布式存储系统进行版本升级,需要重启系统的每个数据服务器完成版本更新。
在先技术中,对于分布式存储系统的升级,存在如下几种方案:
其一,关闭上层服务,并停止整个分布式存储系统,对分布式存储系统所有的数据服务器进行重启升级,所有数据服务器升级完毕后,再恢复上层服务。
但是,该种方案导致上层服务整体不可用,其服务的不可用时间很长,对于一些需要高可用的服务是不可接受的。
其二,不停上层服务,以轮转的方式重启每个数据服务器,客户端向多个(该多个为默认需要备份的个数)数据服务器发送写入请求,以向数据服务器写入待写数据,如果请求失败,则客户端向上述数据服务器进行重试,以保证客户端的访问继续进行。
但是,该种方案中,如果客户端等待该数据服务器恢复并重试,而由于数据服务器一般重启恢复的时间在秒级,而高实时的数据访问延时在10-100MS级,该种重试策略将极大影响服务器的响应时间。
其三,不停上层服务,以轮转的方式重启每个数据服务器,客户端向多个(该多个为默认需要备份的个数)数据服务器发送写入请求,以向数据服务器写入待写数据如果请求失败,则客户端忽略这些数据服务器进行 重试,以保证客户端的访问继续进行。
但是,该种方案中,客户端暂时忽略请求失败的数据服务器,分布式存储系统而对这些数据服务器的轮转升级继续进行。如果分布式存储系统中各个数据服务器轮转重启过快,而如果客户端只对一个数据服务器写入成功,从而只有一个数据服务器写入成功,假使恰巧轮转时这个数据服务器的磁盘或者机器损坏,由于该客户端的待写数据没有写入到其他数据服务器中,则会造成用户数据的丢失。即使延长轮转重启时间,但是分布式存储系统的大集群在长时间内轮转时也会有非预期的磁盘和机器异常,还是会产生对客户端的数据只有一个数据服务器写入成功的情况,使用户数据处于极大的丢失风险中。因此该种方案的虽然解决了延迟问题,但是数据的可靠性不足。
发明内容
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种分布式存储系统升级方法和相应的一种分布式存储系统升级装置。
为了解决上述问题,本申请公开了一种分布式存储系统升级方法,应
用于客户端,包括:
对同一份待写数据,向多个数据服务器发送写入请求;
接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;
如果写入成功的个数大于指定个数,则向各写入成功的数据服务器发送第一反馈信息;
如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;
其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身 的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
本申请还公开了一种分布式存储系统升级方法,应用于数据服务器,包括:
接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
本申请还公开了一种分布式存储系统升级方法,应用于升级控制服务器,包括:
获取各数据服务器的状态;所述状态包括可升级状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
本申请还公开了一种分布式存储系统升级装置,应用于客户端,包括:
请求发送模块,用于对同一份待写数据,向多个数据服务器发送写入请求;
判断模块,用于接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;
第一反馈模块,用于如果写入成功的个数大于指定个数,则向各写入 成功的数据服务器发送第一反馈信息;
第二反馈模块,用于如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
本申请还公开了一种分布式存储系统升级装置,应用于数据服务器,包括:
反馈信息接收模块,用于接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
状态确定模块,用于在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
本申请还公开了一种分布式存储系统升级装置,应用于升级控制服务器,包括:
状态获取模块,用于获取各数据服务器的状态;所述状态包括可升级状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
升级通知模块,用于以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
本申请实施例包括以下优点:
本申请实施例,在分布式存储系统启动升级流程后,对于访问该分布式存储系统的客户端,让各个客户端对于同一个待写数据,同时向多个数据服务器发送该针对该待写数据的写入请求,然后分析在多少个数据服务器中写入成功该待写数据,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。对于数据服务器,根据接收到的第一反馈信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。对于升级控制服务器,则可以根据数据服务器的状态以轮转的方式选择通知所述数据服务器进行升级操作。通过上述过程,本申请实施例中,在升级控制服务器在以轮转的方式控制各数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险。
附图说明
图1是本申请的客户端侧的一种分布式存储系统升级方法实施例的步骤流程图;
图2是本申请的数据服务器侧的一种分布式存储系统升级方法实施例的步骤流程图;
图3是本申请的升级控制服务器侧的一种分布式存储系统升级方法实施例的步骤流程图;
图4是本申请的一种分布式存储系统升级系统实施例的步骤流程图;
图5是本申请的客户端侧的一种分布式存储系统升级装置实施例的结构框图;
图6是本申请的客户端侧的一种分布式存储系统升级装置实施例的结构框图;
图7是本申请的数据服务器侧的一种分布式存储系统升级装置实施例的结构框图;
图8是本申请的升级控制服务器侧的一种分布式存储系统升级装置实施例的结构框图;
图8A是本申请实施例的分布式存储系统的架构示例。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
本申请实施例的核心构思之一在于,对于分布式存储系统的数据服务器、升级控制服务器进行了创造性的更改,并且对访问数据服务器的客户端,也提供了新的执行逻辑。在分布式存储系统启动升级流程后,对于访问该分布式存储系统的客户端,对于访问该分布式存储系统的客户端,每个客户端对于同一个待写数据,同时向多个数据服务器发送针对该待写数据的写入请求,然后分析在多少个数据服务器中写入成功该待写数据,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。对于数据服务器,根据接收到的第一反馈信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。对于升级控制服务器,则可以根据数据服务器的状态以轮转的方式选择通知所述数据服务器进行升级操作。通过上述过程,在升级控制服务器在以轮转的方式控制可升级状态的数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险; 并且可容忍升级过程中非预期的机器异常,保证服务不受影响。
实施例一
本申请实施例应用于客户端侧。
参照图1,示出了本申请的一种分布式存储系统升级方法实施例的步骤流程图,具体可以包括如下步骤:
步骤110,对同一份待写数据,向多个数据服务器发送写入请求。
在本申请实施例中,对于一客户端A,在分布式存储系统的升级过程中,当该客户端要向数据服务器写入待写数据A1时,该客户端A会向多个数据服务器发送针对该待写数据A的写入请求。
在本申请实施例中,可以预先设置多个数据服务器的个数R,比如10个。具体的个数R本申请实施例不对其加以限制。
那么对于该待写数据,其可以向R数据服务器发送写入请求,然后进入步骤120。
可以理解,在实际应用中,该客户端A可先向分布式存储系统的调度服务器发送R个写入请求,然后由该调度服务器控制该R个写入请求分配给哪R个数据服务器。
需要说明的是,不同客户端针对其待写数据,向R个数据服务器发送写入请求,各自的R个数据服务器可以相同也可以不同。
在本申请另一优选的实施例中,在步骤110之前,还包括步骤101-102:
步骤101,在访问一数据服务器时,接收由数据服务器发送的第二升级通知。
步骤102,根据所述第二升级通知进入升级准备状态。
在本申请实施例中,分布式存储系统的升级控制服务器首先通知各个数据服务器进入升级准备状态。那么各个数据服务器则可以向访问该数据服务器的客户端发送第二升级通知,以使客户端进入升级准备状态。
相应的,对于客户端A来说,其访问进入了升级准备状态的一数据服务器后,该数据服务器则返回第二升级通知给该客户端。该客户端接收到该第二升级准备通知后,则根据该第二升级准备通知进入升级准备状态。
在本申请实施例中,如果客户端是通过浏览器的网页的方式访问数据服务器,本申请可以通过浏览器打开的网页,给浏览器传输一个升级脚本,浏览器接收到该脚本后,则可以执行该脚本,使客户端进入升级准备状态。如果客户端是通过支付宝APP等方式访问数据服务器,本申请可以预先在上述APP中添加升级处理逻辑,该APP在接收到第二升级通知后,则启用升级处理逻辑,使客户端进入升级准备状态。当然,具体方式本申请实施例不对其加以限制。
当客户端进入升级准备状态,则可以进入本申请实施例的步骤110、120、130、140等由客户端侧执行的步骤。
步骤120,接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;如果写入成功的个数大于指定个数,则进入步骤130;如果写入成功的个数不大于指定个数,则进入步骤140。
在本申请实施例中,在正常情况下,各数据服务器接收到客户端发送的针对同一份待写数据的写入请求后,会相应地返回响应给客户端。当然,如果某个数据服务器正在升级,或者宕掉,则不会返回响应给客户端。
在本申请实施例中,客户端针对待写数据A1,在向R个数据服务器发送写入请求后,则可以周期性的检查接收到的响应。如周期性的检查是否接收到该某个或某些个数据服务器的响应。如果在指定时间周期内未接收到某或者某几个数据服务器的响应,则说明该待写数据A1没能成功写入该某个或者某几个数据服务器中。如果在指定时间周期内接收到某个或某几个数据服务器的响应,则可以分析该响应是写入成功响应,还是写入失败响应;如果是写入成功响应,则说明该写入成功响应对应的数据服务器对待写数据A1的备份成功,也即写入成功;如果是写入失败响应,则说明该写入失败响应对应的数据服务器对待写数据A1的备份失败,也即写入失败。
需要说明的是,对于R个数据服务器的响应,客户端A是周期性的检查M是否大于N。该周期如1ms(微秒),当然,该周期可以根据需要设定,本申请不对其加以限制。
那么,本申请可以基于上述判断,统计待写数据A1向数据服务器写入成功的个数。
在本申请实施例中,可以预设一个写入成功的指定个数,该指定个数为写入成功的最低个数,也可以理解为一个客户端的待写数据备份成功的数据服务器的个数,该指定个数比如N个,该N<R,N、R均为正整数。在实际中可以默认N=3,R=10,当然,N和R的值可以根据实际需求设置,本申请不对其加以限制。
那么客户端A将其当前的待写数据A1向R个数据服务器发送写入请求后,如果有M个数据服务器返回写入成功响应,那么则判断是否M>N。如果M>N,则进入步骤130;如果M≤N,则进入步骤140。其中,M≥0,且为整数。
当然,在实际应用中,由于数据服务器是按照机架放置的,那么这R个数据服务器可以分布在不同的机架上,进一步提高容灾备份效果。最优的情况是,该R个数据服务器完全分布在不同的机架上。
步骤130,向各写入成功的数据服务器发送第一反馈信息。
由于可以成功接收客户端的写入请求,并将其中的待写数据进行备份,则表示这M个数据服务器是可用的。那么客户端可以向该M个数据服务器发送第一反馈消息。该第一反馈消息可以如OK消息,该OK消息告诉数据服务器可以将自身的状态设置为可升级状态。
当然,实际中数据服务器如何根据该第一反馈消息设置自身的状态为可升级状态,本申请在实施例二中进行详细描述。
步骤140,向各写入成功的数据服务器发送第二反馈信息。
其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
如果M≤N,由于这M个数据服务器是可用的,那么客户端可以向该M个数据服务器发送第二反馈消息。该第二反馈消息可以如HOLD心跳消息,该HOLD消息告诉数据服务器可以将自身的状态设置为不可升级状态。当然,实际中数据服务器如何根据该第二反馈消息设置自身的状态为不可升级状态,本申请在实施例二中进行详细描述。
需要说明的是,对于M<N的情况,客户端重新向新的数据服务器发送写入请求,直到保证M至少等于N。
对于分布式存储系统中的各个未升级的数据服务来说,当其接收到第一反馈信息或第二反馈信息后,则可以根据第一反馈信息或第二反馈信息确定自身是处于可升级状态还是处于不可升级状态。其中可升级状态比如OK,不可升级状态比如HOLD。比如,如果某个数据服务器收到了第二反馈信息,则该数据服务器则可将自身的状态设置为不可升级状态。如果某个数据服务器收到的了第一反馈信息,则可将自身的状态设置为可升级状态。
当然,在实际应用中,由于上层服务不停止,而数据服务器又在不断升级,所以上述R个数据服务器中也可能存在升级完毕的数据服务器。那么对于已升级的数据服务器,其收到的任何上述反馈信息,不会再做进一步处理,其状态保持为已升级状态。
对于数据服务器如何根据接收到第一反馈信息或第二反馈信息确定自身的状态的具体过程,本申请在实施例二中进行详细描述。
进一步的,各个数据服务器的状态可以由升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。对于升级控制服务器如何以轮转的方式通知所述数据服务器进行升级操作的具体过程,本申请在实施例三中描述。
在本申请另一优选的实施例中,步骤140,包括子步骤141-144:
子步骤141,如果所述写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息。
如前述客户端A对待写数据A1,第一次发送到了R个数据服务器,那么如果监控到写入成功响应的个数M=N,则可以直接向该M个写入成功的数据服务器发送第二反馈信息。
子步骤142,如果所述写入成功的小于指定个数,则针对所述待写数据向所述多个数据服务器之外的至少一个数据服务器发送写入请求。
子步骤143,接收所述至少一个数据服务器返回的响应,并结合已写入成功的个数判断当前写入成功的个数是否等于指定个数。如果当前写入成功的个数等于指定个数,则进入子步骤144;果当前写入成功的个数小于指定个数,则进入子步骤142;
子步骤144,如果当前写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息。
对于子步骤142-144如前述客户端A对待写数据A1,第一次发送到了R个数据服务器,那么如果监控到响应成功的个数M<N,则再次至少向N-M个数据服务器发送写入请求。再接收该N-M个数据服务器的响应,如果该N-M个数据服务器中返回写入成功响应的个数加上前面R各数据服务器的写入成功响应的个数得到的M,如果此时M=N,则向各写入成功的数据服务器发送第二反馈信息。此时M的值变化,但是如果此时还是M<N,则再次至少向N-M个数据服务器发送写入请求,如此类推,直至M=N,然后向各写入成功的数据服务器发送第二反馈信息。
进一步的,比如R=10,N=5,客户端A对待写数据A1,第一次发送到了10个数据服务器,那么如果监控到写入成功响应的个数M=3,那么再次至少向5-3=2个数据服务器次发送写入请求,继续监控该2个数据服务器的写入成功响应的个数,发现只收到1个写入成功响应,则加上之前记录的3,得到M=4。那么再次至少向5-4=1个数据服务器次发送写入请 求。按上述方式继续监控和判断,当M=N=5时,然后向各写入成功的数据服务器发送第二反馈信息。当然,实际应用中,当M<N,在上述过程中,可以对每次发送写入请求后,写入成功的数据服务器直接发送第二反馈消息,不用全部等到M=N后再一起发送,
当然,实际应用中,由于是周期性的检查数据服务器的响应,那么如果在指定周期T,比如3*T的情况下,还判断M<N,则至少向N-M个数据服务器再次发送写入请求。每次循环中,对M和N的判断均如此。一般情况下,几次循环即可确定M=N,响应时间总的来说也很短,不会太影响客户端的响应时延,用户对上述情况的响应时延感觉也比等待重启的情况低很多。
如此,可以在保证客户端的待备份数据在多个数据库中备份成功,同时不影响上传服务的正常使用。
在本申请另一优选的实施例中,在步骤140之后,还包括步骤150:
步骤150,当出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象,进入步骤120。
可以理解,对于M=N的情况,由于客户端向各写入成功的数据服务器返回了HOLD心跳信息,那么这些数据服务器设置自身为不可升级状态,如HOLD状态。为了更方便的清除该客户端对这些数据服务器的限定,本申请实施例则在客户端后续对新的待写数据发送写入请求时,继续向之前的R个数据服务器发送。
比如客户端A的待写数据A1,之前向数据服务器U1、U2……U10这10个数据服务器发送了写入请求,然后判断M=N,则对于客户端A的待写数据A2,则可以继续向U1、U2……U10这10个数据服务器发送了写入请求,继续步骤120的判断。
可以理解的是,对于子步骤142的情况,则该R个数据服务器包括写入成功的M个,然后剩余R-M个数据服务器则从写入失败的各数据服务器中选择。比如R=10,N=3,对于客户端A的待写数据A1,第一次向U1、 U2……U10这10个数据服务器发送了写入请求,只有U1、U2写入成功,然后第二次向U11、U12发送了写入请求,U11写入成功;那么对于客户端的待写数据A2,则可以选择U1、U2、U11、U4、U5……U10这10个数据服务器,向这10个数据服务器发送写入请求,当然也可以选择包括U1、U2、U11和另外的数据服务器组成10个数据服务器。
那么当,客户端A的待写数据A2写入成功的个数M>N时,可以向各写入成功的数据服务器发送OK消息,数据服务器则可以根据该OK消息判断是否将自身的状态修改为可升级状态。
如此,可以通过一客户端在M<N的情况下,再次向与上次相同的R个数据服务器写入待写数据,以主动更新数据服务器的状态,可以降低数据服务器处于不可升级状态的时间。
在本申请另一优选的实施例中,所述第一反馈信息和第二反馈信息包括客户端标识。
比如对于客户端A,在向服务器发送第一反馈信息或第二反馈信息时,该第一反馈信息、第二反馈信息中都包括客户端标识“客户端A”。
则所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态包括:
所述第二反馈信息供所述数据服务器在接收到第二反馈信息后,将第二反馈信息中的客户端标识写入不可升级列表并标记自身的状态为不可升级状态;
在本申请实施例中,在数据服务器侧设置了不可升级列表。以客户端A为例,那么在数据服务器接收到客户端A的第二反馈信息后,则将其自身的状态设置为不可升级状态,并将该客户端A写入不可升级列表。
所述第一反馈信息供所述数据服务器在接收到第一反馈信息后,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
在本申请实施例中,由于客户端A在向各写入成功的数据服务器发送第二反馈信息的步骤之后,出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象。那么对于接收到客户端A发送的第二反馈消息的数据服务器,其后续还会接收该客户端A发送的消息。那么当数据服务器继续接收到客户端A的消息为第一反馈消息,则可以从不可升级列表中删除客户端A的记录。
当然,实际应用中,数据服务器接收到某个客户端的第一反馈消息,可能不可升级列表中没有记录相应客户端标识,则不用执行删除过程。
然后,在数据服务器确定不可升级列表为空时,将自身的状态设置为可升级状态。
当然,在本申请实施例中,客户端还可以接收数据服务器发送的退出升级准备状态的退出通知,并根据该退出通知退出升级准备状态。然后客户端则按照正常请求发送逻辑向数据服务器发送写入请求。
在本申请实施例中,从客户端侧介绍了本申请的一种分布式存储系统升级方法,让各个客户端对于同一个待写数据,同时向多个数据服务器发送该针对该待写数据的写入请求,然后分析在多少个数据服务器中写入成功,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。其中所述第一反馈信息供所述数据服务器在接收到第一反馈信息后,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。。从而本申请实施例中,在升级控制服务器在以轮转的方式控制各数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险。
实施例二
本申请实施例应用于分布式存储服务器的数据服务器侧。
参照图2,示出了本申请的一种分布式存储系统升级方法实施例的步骤流程图,具体可以包括如下步骤:
步骤210,接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得。
结合实施例一客户端侧的描述,客户端针对待写数据A1,向R个数据服务器发送写入请求后,当写入成功的个数M大于指定个数N,则会向该M个数据服务器发送第一反馈消息;当M等于N,则会向该M个数据服务器发送第二反馈消息。当M<N,则针对所述待写数据A1向所述多个数据服务器之外的至少一个数据服务器发送写入请求,然后接收所述至少一个数据服务器返回的响应,并结合已写入成功的个数判断当前全部的写入成功的个数M是否等于指定个数N,如果M=N,则向该M个数据服务器发送第二反馈信息。当然,对于客户端返回第一反馈信息和第二反馈信息的具体过程可以参照实施例一的描述,在此不再赘叙。
相对的,对于分布式存储系统的各个数据服务器,其可能接收到各个客户端返回的第一反馈信息,如OK消息。也可能接收到各个客户端返回的第二反馈消息,如HOLD消息。
优选地,在步骤210之前,还包括:
步骤201,接收由升级控制服务器发送的第一升级通知。
步骤202,根据所述第一升级通知进入升级准备状态,并在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
在本申请实施例中分布式存储系统的升级控制服务器首先向各数据服务器发送第一升级通知,相应的各数据服务器则接收该第一升级通知,然后根据该第一升级通知进入升级准备状态。
然后,对于访问该进入升级准备状态的数据服务器,接收到某个客户端的访问请求后,则返回第二升级通知至该客户端。该客户端则根据该第 二升级通知进入升级准备状态。
当数据服务器进入升级准备状态,则可以进入本申请实施例的步骤210、220等由数据服务器侧执行的步骤。
步骤220,在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态。
其中,所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
在实际应用中,除了所有数据服务器刚进入升级准备状态,各个数据服务器处于未升级的情况。而随着某些数据服务器不断完成升级过程,这些数据服务器则会处于已升级状态,比如已成功升级的数据服务器设置自身的状态为DONE,此时,已成功升级的数据服务器也会接收到第一反馈信息或者第二反馈信息,但是其不会再对第一反馈信息或者第二反馈信息进行处理,其状态保持为已升级状态。
而只有处于未升级状态的数据服务器才根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态。
可以理解,对于分布式集群中的各个未升级的数据服务来说,当其接收到第一反馈信息或第二反馈信息后,则可以根据第一反馈信息或第二反馈信息确定自身是处于可升级状态还是处于不可升级状态。其中可升级状态比如OK,不可升级状态比如HOLD。比如,如果某个数据服务器收到了第二反馈信息,则该数据服务器则可将自身的状态设置为不可升级状态。如果某个数据服务器收到的了第一反馈信息,则可将自身的状态设置为可升级状态。
在本申请另一优选的实施例中,第一反馈信息和第二反馈信息包括客户端标识。
那么基于实施例一的步骤150,则优选地,步骤220,包括子步骤221-222:
子步骤221,当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态;
在本申请实施例中,在各个数据服务中预先设置了不可升级列表,用于记录发送了HOLD消息的客户端标识等信息。
比如对于客户端A,其对于待写数据A1,向多个数据服务器发送写入请求,其中数据服务器U1、U2、U3写入成功,且M=N时,其会向相应的M个数据服务器发送HOLD消息。该HODL消息包括了HOLD指令、客户端标识。那么这M个数据服务器接收到HOLD消息,则在不可升级列表中记录客户端A。当然,还可以相应记录当前时间。
比如客户端B对其待写数据B1,向多个数据服务器发送写入请求,该多个数据服务器中也包括了数据服务器U1,且M=N。那么数据服务器U1的不可升级列表中还记录客户端B。当然也可记录当前时间。
数据服务器U1的不可升级列表记录示例如表一:
客户端标识 时间
客户端A 2015.10.01,10:00:00:00
客户端B 2015.10.01,12:01:00:00
表一
当然,对于同一客户端再次发送的HOLD消息,则不可升级列表中可以只记录一条该对应该客户端的客户端标识,也可以记录多条对应客户端的客户端标识。在实际应用中,优选的,对于同一客户端多吃发送的HOLD消息,可以只记录一条客户端标识,然后在时间字段,记录各次的时间。
在接收到HOLD消息后,还将数据服务器自身的状态修改为HOLD状态,表示该数据服务不可升级。
优选地,在子步骤221之后,还包括子步骤B21:
子步骤B21,对于不可升级列表中的客户端标识,判断是否在指定个数的时间周期内未接收到相应客户端的第二反馈消息,如果未在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则将所述客户端标识从不可升级列表中删除。
本申请实施例可以预先设置一个时间周期T1,对于不可升级列表中的客户端标识所对应的客户端,如果数据服务器在指定未接收到该客户端再次发送的HOLD消息,则将不可升级列表中该客户端标识记录删除。
比如前述数据服务器U1的表一,如果在3*T1的时间内,未接收到客户端A的HOLD消息,则将表一中客户端A的记录删除。
该步骤可以避免数据服务器处于不可升级状态之后,一直处于不可升级状态。
子步骤222,接收到第一反馈信息,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
比如前述数据服务器U1,其接受到客户端A再次发送的OK消息,则从表一中将客户端A的记录删除。当数据服务器将表一的所有记录都删除后,表一为空时,则将自身的状态设置为可升级状态,
在本申请另一优选的实施例中,子步骤222,包括子步骤B11-B14:
子步骤B11,判断所述不可升级列表是否有所述第一反馈信息中的客户端标识;如果所述不可升级列表有所述第一反馈信息中的客户端标识,则进入子步骤B12。
子步骤B12,将所述客户端标识从不可升级列表中删除。
由于一个数据服务器可能被分配给不同的客户端使用,因此,可能接收到不同客户端的第一反馈信息,那么对于接收到的某个客户端的第一反馈信息,则判断所述不可升级列表是否有所述第一反馈信息的客户端标识,所述不可升级列表有所述第一反馈信息的客户端标识,则将所述客户 端标识从不可升级列表中删除;所述不可升级列表没有所述第一反馈信息的客户端标识,则可以不进行后续操作。
比如对于前述数据服务器U1,如果接收到客户端A再次发送的ok消息,该ok消息中包括客户端标识,则可以利用客户端标识与表一的客户端标识进行匹配,发现存在客户端A,则清除客户端A的记录。如果接收到客户端C发送的Ok消息,发现表一中没有记录,则不进行任何操作。
上述步骤方便数据服务器对自身的升级状态进行管理,逻辑简单。
子步骤B13,判断不可升级列表是否为空;如果所述不可升级列表为空时,则进入子步骤B14。如果所述不可升级列表不为空,则保持自身的状态为不可升级状态。
子步骤B14,标记自身的状态为可升级状态。
如果所述不可升级列表不为空时,则保持自身的不可升级状态。
如前述例子,对于数据服务器U1,先接收到客户端A发送的OK消息,清除了客户端A的记录,判断表一还是不为空,则继续保持HOLD状态。如果再接收到客户端B的OK消息,则在子步骤221中将表一中的客户端B的记录删除,此时判断表一为空,则数据服务器U1修改自身的HODL状态为OK状态,表示数据服务器U1可以升级。
然后,升级控制服务器可以根据各数据服务器的状态以轮转的方式选择通知所述数据服务器进行升级操作。当然升级控制服务器具体控制各数据服务升级的过程可以参照实施例三的描述。
当然,在本申请实施例中,数据服务器还可以升级控制服务器发送的退出升级准备状态的退出通知,并根据该退出通知退出升级准备状态,同时根据该退出通知向客户端发送退出通知,使客户端退出升级准备状态。然后数据服务器则按照正常处理逻辑对客户端的写入请求进行处理。
在本申请实施例中,从数据服务器侧介绍了本申请的一种分布式存储系统升级方法,对于数据服务器,根据接收到的客户端发送的第一反馈 信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。其中所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。从而是由客户端控制数据服务器的状态,保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,在升级控制服务器以轮转的方式控制各数据服务器进行升级时,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险。
实施例三
参照图3,示出了本申请的一种分布式存储系统升级方法实施例的步骤流程图,具体可以包括如下步骤:
步骤310,获取各数据服务器的状态;所述状态包括可升级状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得。
结合实施例一和实施例二的描述,分布式存储系统中各个数据服务器可以根据客户端反馈的第一反馈消息和/或第二反馈消息,确定其状态,该状态包括可升级状态和不可升级状态。
由于每个数据服务器同时只能有一个状态。比如某个数据服务器如果处于可升级状态,则其不可能有其他状态。其他情况类似,在此不再赘叙。
那么,本申请实施例的升级控制服务器则可以获取各个数据服务的状态。
升级控制服务器获取数据服务的状态的具体获取方式可以有多种,本申请实施例不对其加以限制。
步骤320,以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
在本申请实施例中,由于各个数据服务器根据客户端的反馈信息设定了自身状态,那么升级控制服务器可以采用轮转的方式控制处于可升级状态的数据服务器进行升级操作。
比如,每次选择一批可升级的数据服务器,通知这批数据服务器进行升级操作。该批数据服务器收到升级通知后,则可以重启升级。
在本申请另一优选的实施例中,步骤320包括子步骤321-322:
子步骤321,每次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作;
比如处于可升级状态的数据服务器有U1、U2、U3,U10、U11、……U20等,则升级控制服务器每次可以从中选择K个数据服务器,通知其进行升级操作,比如选择3个。其中K为大于0的整数。当然,K可以根据实际需求设置,本申请不对其加以限制。
子步骤322,监控所述至少一个处于可升级状态的数据服务器是否全部执行完升级操作;如果所述至少一个处于可升级状态的数据服务器全部执行完升级操作,则进入子步骤321;
比如升级控制服务器通知了前述数据服务器U1、U2、U3进行升级操作,那么数据服务器U1、U2、U3则重启升级。当数据服务器升级成功之后,则可以修改自身的状态为已升级状态,比如DONE。
那么升级控制服务器则可以监控这些数据服务器的状态是否为DONE,如果未DONE,则升级成功。
当然,实际应用中,可能该批数据服务器升级过程中,某个或者某几个可能升级失败,升级控制服务器则监控该数据服务器升级成功或者失败。在实际应用中,升级失败可以通过如机器重启失败,重启后系统版本未变更等情况确定。
需要说明的是,上述执行完升级操作包括升级成功和升级失败。全部执行完升级操作包括:所有数据服务器全部升级成功;如果部分数据服务器升级成功,则剩余的数据服务器升级失败。
如果U1、U2、U3的状态全部为DONE,则进入下一次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作的步骤。
当升级控制服务器监控到其通知升级的数据服务器全部执行完升级操作,则可以从处于可升级状态的数据服务器中轮转选择下一批升级的数据服务器。
如此,可以避免轮转的频率过快,降低数据丢失的风险。
在本申请另一优选的实施例中,在数据服务器执行升级操作后,还包括:
子步骤323,如果监控到任一数据服务器的升级操作的结果为升级失败,则将所述数据服务器加入升级黑名单,暂停对该数据服务器的升级。
如果某个数据服务器升级失败,则升级控制服务器将该数据服务器加入升级黑名单,暂停对该数据服务器的升级。使这些数据服务器等待下线或者人工修复。
优选的,本申请实施例的多个数据服务器可分布于至少两个机架上,当然实际应用中,分布式存储系统的各个数据服务器分布在多个机架上,一个机架为一个数据服务器子集群。
进一步的,则步骤320,包括子步骤C11:
子步骤C11,每次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作;所述机架中的各数据服务器根据所述通知检查自身的状态,如果处于可升级状态,则重启升级,如果处于不可升级状态或者升级完毕状态,则拒绝重启升级。
在本申请实施例中,由于数据服务器以机架的形式放置,一个机架放 置了一批数据服务器。而对于大量的客户端来说,其可能访问不同机架的不同的数据服务器,从而使各个机架都可能存在可升级状态的数据服务器,也可能存在不可升级状态的数据服务器,也可能存在升级完毕的数据服务器。
而为了方便升级控制服务器发送升级的通知,本申请实施例以机架为单位发送升级通知,比如一机架的IP段为200.200.200.***,本申请实施例的升级控制服务器至需要生成一条针对200.200.200.***的通知,广播到该机架中,该机架的各个数据服务器即可接收到该通知。
那么对于该机架中的数据服务器,接收到上述升级的通知后,则先判断自身的状态是否为OK,如果是OK,则重启升级;如果不是OK,而是HOLD或者DONE,则拒绝重启升级。
本申请实施例中,为了更快的完成升级,则选择状态为OK的数据服务器最多的机架,向该机架发送升级的通知。
比如处于可升级状态的数据服务器有U1、U2、U3,U10、U11、……U20等,则每次可以从中选择K个数据服务器,通知其进行升级操作,比如选择3个。
优选地,在子步骤C11之后,还包括子步骤C12:
子步骤C12,监控所述机架中的数据服务器是否全部执行完升级操作;如果所述机架中的数据服务器全部执行完升级操作,则进入子步骤C11。
那么,当监控到该机架中处于可升级状态的数据服务器的升级操作全部执行完毕之后,则可以选择下一个机架,向下一个机架的数据服务器发送升级的通知。如此循环,直到所有的数据服务器升级完毕。
通过上述过程,当升级控制服务器监控到除了升级失败的数据服务器之外,所有数据服务器升级完毕之后,则可以通知各个数据服务器退出升级准备状态,返回正常的处理逻辑,各个数据服务器则通知访问该数据服务器的客户端退出升级准备状态,客户端返回正常的处理逻辑,不再执行步骤310、320。
在本申请实施例中,从升级控制服务器侧介绍了本申请的一种分布式存储系统升级方法,升级控制服务器在以轮转的方式控制可升级状态的数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险;并且可容忍升级过程中非预期的机器异常,保证服务不受影响。再者升级时间快,避免大量的数据迁移。
实施例四
参照图4,示出了本申请的一种分布式存储系统升级方法实施例的步骤流程图,具体可以包括如下步骤:
步骤410,由客户端对同一份待写数据,向多个数据服务器发送写入请求。
步骤412,由客户端接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;如果写入成功的个数大于指定个数,则进入步骤414;如果写入成功的个数不大于指定个数,则进入步骤416。
步骤414,由客户端向各写入成功的数据服务器发送第一反馈信息。
步骤416,由客户端向各写入成功的数据服务器发送第二反馈信息;
在本申请另一优选的实施例中,所述第一反馈信息和第二反馈信息包括客户端标识。在向各写入成功的数据服务器发送第二反馈信息的步骤之后,还包括:
步骤417,当出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象,进入对同一份待写数据,向多个数据服务器发送写入请求的步骤。
步骤418,由数据服务器接收客户端发送的第一反馈信息或者第二反 馈信息;
步骤420,由数据服务器在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;
优选的在步骤417的基础上,所述步骤420包括子步骤D11-D16:
子步骤D11,当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态;
子步骤D12,对于不可升级列表中的客户端标识,判断是否在指定个数的时间周期内未接收到相应客户端的第二反馈消息;如果未在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则进入子步骤D13。如果在在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则维持不可升级状态。
子步骤D13,将所述客户端标识从不可升级列表中删除。进入子步骤D15。
子步骤D14,判断所述不可升级列表是否有所述第一反馈信息中的客户端标识;如果所述不可升级列表有所述第一反馈信息中的客户端标识,则进入子步骤D13。如果所述不可升级列表没有所述第一反馈信息中的客户端标识,则进入子步骤D15
子步骤D15,判断不可升级列表是否为空;如果所述不可升级列表为空时,则进入子步骤D16。
子步骤D16,标记自身的状态为可升级状态。
步骤422,由升级控制服务器获取各数据服务器的状态;
步骤424,由升级控制服务器以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;
步骤426,由数据服务器根据所述通知进行升级操作。
当然本发明实施例的客户端侧的步骤的原理可以参照实施例一的描述、数据服务器侧的步骤的原理可以参照实施例二的描述,升级控制服务器侧的步骤的原理可以参照实施例三的描述。在此不再赘叙。
在本申请实施例中,从客户端、数据服务器和升级控制服务器三个方面介绍了本申请的一种分布式存储系统升级方法。对于访问该分布式存储系统的客户端,让各个客户端对于同一个待写数据的写入请求,同时向多个数据服务器发送该写入请求,然后分析在多少个数据服务器中写入成功,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。对于数据服务器,根据接收到的第一反馈信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。对于升级控制服务器,则可以轮转控制处于可升级状态的数据服务器进行升级操作。通过上述过程,在升级控制服务器在以轮转的方式控制可升级状态的数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险;并且可容忍升级过程中非预期的机器异常,保证服务不受影响。
实施例五
参照图5,示出了本申请的一种分布式存储系统升级装置实施例的结构框图,具体可以包括如下模块:
请求发送模块510,用于对同一份待写数据,向多个数据服务器发送写入请求。
在本申请另一优选的实施例中,在步骤510之前,还包括:
第二升级通知接收模块,用于在访问一数据服务器时,接收由数据服务器发送的第二升级通知。
第二升级准备模块,用于根据所述第二升级通知进入升级准备状态。
判断模块520,用于接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数。
第一反馈模块530,用于如果写入成功的个数大于指定个数,则向各写入成功的数据服务器发送第一反馈信息。
第二反馈模块540,用于如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
在本申请另一优选的实施例中,第二反馈模块540,包括:
第二反馈信息发送子模块,用于如果所述写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息。
写入请求发送子模块,用于如果所述写入成功的小于指定个数,则针对所述待写数据向所述多个数据服务器之外的至少一个数据服务器发送写入请求。
判断子模块,用于接收所述至少一个数据服务器返回的响应,并结合已写入成功的个数判断当前写入成功的个数是否等于指定个数;如果当前写入成功的个数等于指定个数,则进入第二反馈信息发送子模块。
在本申请另一优选的实施例中,在第二反馈信息发送子模块之后,还包括:
新待写数据发送子模块,用于当出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象,进入请求发送模块。
在本申请另一优选的实施例中,所述第一反馈信息和第二反馈信息包括客户端标识,则所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态包括:
所述第二反馈信息供所述数据服务器在接收到第二反馈信息后,将第 二反馈信息中的客户端标识写入不可升级列表并标记自身的状态为不可升级状态;
所述第一反馈信息供所述数据服务器在接收到第一反馈信息后,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
实施例六
参照图6,示出了本申请的一种分布式存储系统升级装置实施例的结构框图,具体可以包括如下模块:
反馈信息接收模块610,用于接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得。
在本申请另一优选的实施例中,在反馈信息接收模块610之前,还包括:
第一升级通知接收模块,用于接收由升级控制服务器发送的第一升级通知。
第一升级准备模块,用于根据所述第一升级通知进入升级准备状态,并在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
状态确定模块620,用于在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
在本申请另一优选的实施例中,状态确定模块620,包括:
可升级状态确定子模块,用于当接收到第一反馈信息,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标 记自身的状态为可升级状态。
优选地,可升级状态确定子模块,包括:
客户端标识判断子模块,用于判断所述不可升级列表是否有所述第一反馈信息中的客户端标识;如果所述不可升级列表有所述第一反馈信息中的客户端标识,则进入第一删除子模块。
第一删除子模块,用于将所述客户端标识从不可升级列表中删除。
不可升级列表判断子模块,用于判断不可升级列表是否为空;如果所述不可升级列表为空时,则进入可升级状态标记子模块。
可升级状态标记子模块,用于标记自身的状态为可升级状态。
不可升级状态确定子模块,用于当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态。
在本申请另一优选的实施例中,在不可升级状态确定子模块之后,还包括:
时间判断子模块,用于对于不可升级列表中的客户端标识,判断是否在指定个数的时间周期内未接收到相应客户端的第二反馈消息,如果未在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则进入第二删除子模块;
第二删除子模块,用于将所述客户端标识从不可升级列表中删除。
实施例七
参照图7,示出了本申请的一种分布式存储系统升级装置实施例的结构框图,具体可以包括如下模块:
状态获取模块710,用于获取各数据服务器的状态;所述状态包括可升级状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息 或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得。
在本申请另一优选的实施例中,在状态获取模块710之前,还包括:
升级通知发送模块,用于向各数据服务器发送第一升级通知,使各数据服务器进入升级准备状态,并使各数据服务器在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
升级通知模块720,用于以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
在本申请另一优选的实施例中,所述升级通知模块包括:
第一选择子模块,用于每次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作;
第一监控子模块,用于监控所述至少一个处于可升级状态的数据服务器是否全部执行完升级操作;如果所述至少一个处于可升级状态的数据服务器全部执行完升级操作,则进入第一选择子模块。
在本申请另一优选的实施例中,在监控子模块之后,还包括:
暂停子模块,适于如果监控到任一数据服务器的升级操作的结果为升级失败,则将所述数据服务器加入升级黑名单,暂停对该数据服务器的升级。
在本申请另一优选的实施例中,各数据服务器分布于至少两个机架上;则升级通知模块720,包括:
升级通知子模块,用于每次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作;所述机架中的各数据服务器根据所述通知检查自身的状态,如果处于可升级状态,则重启升级,如果处于不可升级状态或者升级完毕状态,则拒绝重启升级。
在本申请另一优选的实施例中,在升级通知子模块之后,还包括:
监控子模块,用于监控所述机架中的数据服务器是否全部执行完升级操作;如果所述机架中的数据服务器全部执行完升级操作,则进入升级通知子模块。
实施例八
参照图8和图8A,其示出了本申请的一种分布式存储系统升级系统实施例的结构框图,具体可以包括如下模块:多个客户端810、多个数据服务器820和升级控制服务器830。
其中,图8A其示出本发明实施例的分布式存储系统的架构示意图。本申请实施例中每个客户端可以向分布式存储系统中的R个发送写入请求,升级控制服务器控制所有数据服务器的升级过程。
图8示出了客户端810、数据服务器820、升级控制服务器830之间的连接关系。
所述客户端810包括:
请求发送模块811,用于对同一份待写数据,向多个数据服务器发送写入请求;
判断模块812,用于接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;
第一反馈模块813,用于如果写入成功的个数大于指定个数,则向各写入成功的数据服务器发送第一反馈信息;
第二反馈模块814,用于如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;
所述数据服务器820包括:
数据存储模块821,用于接收客户端的写入请求,并返回响应给客户端。
反馈信息接收模块822,用于接收客户端发送的第一反馈信息或者第二反馈信息;
状态确定模块823,用于在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态。
升级模块824,用于根据升级控制服务器的通知进行升级操作。
所述升级控制服务器830包括:
状态获取模块831,用于获取各数据服务器的状态;
升级通知模块832,用于以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作。
本申请实施例的客户端的模块可参照实施例五的描述,数据服务器的模块可参照实施例六的描述,升级控制器的模块可参照实施例七的描述。其原理基本类似,在此不再赘叙。
在本申请实施例中,从客户端、数据服务器和升级控制服务器三个方面介绍了本申请的一种分布式存储系统升级方法。对于访问该分布式存储系统的客户端,让各个客户端对于同一个待写数据的写入请求,同时向多个数据服务器发送该写入请求,然后分析在多少个数据服务器中写入成功,判断写入成功的个数是否大于指定个数,根据该判断结果向各写入成功的数据服务器发送第一反馈信息或者第二反馈信息。对于数据服务器,根据接收到的第一反馈信息或者第二反馈信息,确定自身是处于可升级状态还是处于不可升级状态。对于升级控制服务器,则可以轮转控制处于可升级状态的数据服务器进行升级操作。通过上述过程,在升级控制服务器在以轮转的方式控制可升级状态的数据服务器进行升级时,由于由客户端控制数据服务器的状态,并且保证任一客户端的待写数据最少写入指定个数的数据服务器中以进行备份,因此在不用停止上层服务的情况下,既可以保证分布式存储系统对客户端的响应时间较低,也提高了数据的可靠性,大大降低了用户数据丢失的风险;并且可容忍升级过程中非预期的机器异常,保证服务不受影响。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(FLASH RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(TRANSITORY MEDIA),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和 计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、 物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种分布式存储系统升级方法、一种分布式存储升级装置和一种分布式存储升级系统,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (32)

  1. 一种分布式存储系统升级方法,应用于客户端,其特征在于,包括:
    对同一份待写数据,向多个数据服务器发送写入请求;
    接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;
    如果写入成功的个数大于指定个数,则向各写入成功的数据服务器发送第一反馈信息;
    如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;
    其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
  2. 根据权利要求1所述的方法,其特征在于,所述如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息,供所述数据服务器根据第二反馈信息确定自身的状态为不可升级状态的步骤,包括:
    如果所述写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息;
    如果所述写入成功的小于指定个数,则针对所述待写数据向所述多个数据服务器之外的至少一个数据服务器发送写入请求;
    接收所述至少一个数据服务器返回的响应,并结合已写入成功的个数判断当前写入成功的个数是否等于指定个数;
    如果当前写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息。
  3. 根据权利要求1或2所述的方法,其特征在于,在向各写入成功 的数据服务器发送第二反馈信息的步骤之后,还包括:
    当出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象,进入对同一份待写数据,向多个数据服务器发送写入请求的步骤。
  4. 根据权利要求3所述的方法,其特征在于,
    所述第一反馈信息和第二反馈信息包括客户端标识,则所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态包括:
    所述第二反馈信息供所述数据服务器在接收到第二反馈信息后,将第二反馈信息中的客户端标识写入不可升级列表并标记自身的状态为不可升级状态;
    所述第一反馈信息供所述数据服务器在接收到第一反馈信息后,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
  5. 根据权利要求1所述的方法,其特征在于,在对同一份待写数据,向多个数据服务器发送写入请求的步骤之前,还包括:
    在访问一数据服务器时,接收由数据服务器发送的第二升级通知;
    根据所述第二升级通知进入升级准备状态。
  6. 一种分布式存储系统升级方法,应用于数据服务器,其特征在于,包括:
    接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
    在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
  7. 根据权利要求5所述的方法,其特征在于,所述第一反馈信息和第二反馈信息包括客户端标识,则所述在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态的步骤,包括:
    当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态;
    当接收到第一反馈信息,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
  8. 根据权利要求7所述的方法,其特征在于,所述从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态的步骤,包括:
    判断所述不可升级列表是否有所述第一反馈信息中的客户端标识;
    如果所述不可升级列表有所述第一反馈信息中的客户端标识,则将所述客户端标识从不可升级列表中删除;
    判断不可升级列表是否为空;
    如果所述不可升级列表为空时,则标记自身的状态为可升级状态。
  9. 根据权利要求7所述的方法,其特征在于,在当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态的步骤之后,还包括:
    对于不可升级列表中的客户端标识,判断是否在指定个数的时间周期内未接收到相应客户端的第二反馈消息,如果未在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则将所述客户端标识从不可升级列表中删除。
  10. 根据权利要求6所述的方法,其特征在于,所述接收客户端发送的第一反馈信息或者第二反馈信息的步骤之前,还包括:
    接收由升级控制服务器发送的第一升级通知;
    根据所述第一升级通知进入升级准备状态,并在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
  11. 一种分布式存储系统升级方法,应用于升级控制服务器,其特征在于,包括:
    获取各数据服务器的状态;所述状态包括可升级状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
    以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
  12. 根据权利要求11所述的方法,其特征在于,所述以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作的步骤,包括:
    每次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作;
    监控所述至少一个处于可升级状态的数据服务器是否全部执行完升级操作;
    如果所述至少一个处于可升级状态的数据服务器全部执行完升级操作,则进入下一次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作的步骤。
  13. 根据权利要求12所述的方法,其特征在于,还包括:
    如果监控到任一数据服务器的升级操作的结果为升级失败,则将所述数据服务器加入升级黑名单,暂停对该数据服务器的升级。
  14. 根据权利要求11-13其中之一所述的方法,其特征在于,各数据服务器分布于至少两个机架上;
    则所述以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作的步骤,包括:
    每次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作;所述机架中的各数据服务器根据所述通知检查自身的状态,如果处于可升级状态,则重启升级,如果处于不可升级状态或者升级完毕状态,则拒绝重启升级。
  15. 根据权利要求14所述的方法,其特征在于,在每次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作的步骤之后,还包括:
    监控所述机架中的数据服务器是否全部执行完升级操作;
    如果所述机架中的数据服务器全部执行完升级操作,则进入下一次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作的步骤。
  16. 根据权利要求11所述的方法,其特征在于,在获取各数据服务器的状态之前,还包括:
    向各数据服务器发送第一升级通知,使各数据服务器进入升级准备状态,并使各数据服务器在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
  17. 一种分布式存储系统升级装置,应用于客户端,其特征在于,包括:
    请求发送模块,用于对同一份待写数据,向多个数据服务器发送写入请求;
    判断模块,用于接收各数据服务器返回的响应,并根据所述响应判断写入成功的个数是否大于指定个数;
    第一反馈模块,用于如果写入成功的个数大于指定个数,则向各写入成功的数据服务器发送第一反馈信息;
    第二反馈模块,用于如果写入成功的个数不大于指定个数,则向各写入成功的数据服务器发送第二反馈信息;其中,所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态;所述状态包括可升级状态和不可升级状态;所述数据服务器的状态供升级控制服务器以轮转的方式通知所述数据服务器进行升级操作。
  18. 根据权利要求17所述的装置,其特征在于,所述第二反馈模块,包括:
    第二反馈信息发送子模块,用于如果所述写入成功的个数等于指定个数,则向各写入成功的数据服务器发送第二反馈信息;
    写入请求发送子模块,用于如果所述写入成功的小于指定个数,则针对所述待写数据向所述多个数据服务器之外的至少一个数据服务器发送写入请求;
    判断子模块,用于接收所述至少一个数据服务器返回的响应,并结合已写入成功的个数判断当前写入成功的个数是否等于指定个数;如果当前写入成功的个数等于指定个数,则进入第二反馈信息发送子模块。
  19. 根据权利要求17或18所述的装置,其特征在于,在第二反馈模块之后,还包括:
    新待写数据发送模块,用于当出现新的待写数据,以包括之前写入成功的数据服务器的多个数据服务器为对象,进入请求发送模块。
  20. 根据权利要求19所述的装置,其特征在于,
    所述第一反馈信息和第二反馈信息包括客户端标识,则所述第一反馈信息或第二反馈信息供所述数据服务器确定自身的状态包括:
    所述第二反馈信息供所述数据服务器在接收到第二反馈信息后,将第二反馈信息中的客户端标识写入不可升级列表并标记自身的状态为不可升级状态;
    所述第一反馈信息供所述数据服务器在接收到第一反馈信息后,从不 可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
  21. 根据权利要求17所述的装置,其特征在于,在对同一份待写数据,向多个数据服务器发送写入请求的步骤之前,还包括:
    第二升级通知接收模块,用于在访问一数据服务器时,接收由数据服务器发送的第二升级通知;
    第二升级准备模块,用于根据所述第二升级通知进入升级准备状态。
  22. 一种分布式存储系统升级装置,应用于数据服务器,其特征在于,包括:
    反馈信息接收模块,用于接收客户端发送的第一反馈信息或者第二反馈信息;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
    状态确定模块,用于在自身处于未升级的情况下,根据所述第一反馈信息或者第二反馈信息,确定数据服务器自身的状态;所述状态包括可升级状态和不可升级状态;所述状态供升级控制服务器以轮转的方式选择通知所述数据服务器进行升级操作。
  23. 根据权利要求22所述的装置,其特征在于,所述状态确定模块,包括:
    不可升级状态确定子模块,用于当接收到第二反馈信息,则将所述第二反馈信息中的客户端标识写入不可升级列表,并标记自身的状态为不可升级状态;
    可升级状态确定子模块,用于当接收到第一反馈信息,从不可升级列表中删除第一反馈信息中的客户端标识,并在确定不可升级列表为空后标记自身的状态为可升级状态。
  24. 根据权利要求23所述的装置,其特征在于,所述可升级状态确定 子模块,包括:
    客户端标识判断子模块,用于判断所述不可升级列表是否有所述第一反馈信息中的客户端标识;如果所述不可升级列表有所述第一反馈信息中的客户端标识,则进入删除子模块;
    第一删除子模块,用于将所述客户端标识从不可升级列表中删除;
    不可升级列表判断子模块,用于判断不可升级列表是否为空;如果所述不可升级列表为空时,则进入可升级状态标记子模块;
    可升级状态标记子模块,用于标记自身的状态为可升级状态。
  25. 根据权利要求23所述的装置,其特征在于,在不可升级状态确定子模块之后,还包括:
    时间判断子模块,用于对于不可升级列表中的客户端标识,判断是否在指定个数的时间周期内未接收到相应客户端的第二反馈消息,如果未在指定个数的时间周期内未接收到相应客户端的第二反馈消息,则进入第二删除子模块;
    第二删除子模块,用于将所述客户端标识从不可升级列表中删除。
  26. 根据权利要求22所述的装置,其特征在于,在反馈信息接收模块之前,还包括:
    第一升级通知接收模块,用于接收由升级控制服务器发送的第一升级通知;
    第一升级准备模块,用于根据所述第一升级通知进入升级准备状态,并在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
  27. 一种分布式存储系统升级装置,应用于升级控制服务器,其特征在于,包括:
    状态获取模块,用于获取各数据服务器的状态;所述状态包括可升级 状态和不可升级状态,每个数据服务器有一个状态;所述数据服务器的状态根据所述第一反馈信息或者第二反馈信息确定;所述第一反馈信息或第二反馈信息根据客户端对同一份待写数据向多个数据服务器发送写入请求后,写入成功的个数与指定个数的比较结果获得;
    升级通知模块,用于以轮转的方式通知至少一个处于可升级状态的数据服务器进行升级操作;所述数据服务器根据所述通知进行升级操作。
  28. 根据权利要求27所述的装置,其特征在于,所述升级通知模块包括:
    第一选择子模块,用于每次选择至少一个处于可升级状态的数据服务器,通知所述至少一个处于可升级状态的数据服务器执行升级操作;
    第一监控子模块,用于监控所述至少一个处于可升级状态的数据服务器是否全部执行完升级操作;如果所述至少一个处于可升级状态的数据服务器全部执行完升级操作,则进入第一选择子模块。
  29. 根据权利要求28所述的装置,其特征在于,还包括:
    暂停子模块,适于如果监控到任一数据服务器的升级操作的结果为升级失败,则将所述数据服务器加入升级黑名单,暂停对该数据服务器的升级。
  30. 根据权利要求27-29其中之一所述的装置,其特征在于,各数据服务器分布于至少两个机架上;
    则所述升级通知模块,包括:
    升级通知子模块,用于每次选择处于可升级状态的数据服务器最多的机架,通知所述机架中的数据服务器进行升级操作;所述机架中的各数据服务器根据所述通知检查自身的状态,如果处于可升级状态,则重启升级,如果处于不可升级状态或者升级完毕状态,则拒绝重启升级。
  31. 根据权利要求30所述的装置,其特征在于,在升级通知子模块之后,还包括:
    第二监控子模块,用于监控所述机架中的数据服务器是否全部执行完升级操作;如果所述机架中的数据服务器全部执行完升级操作,则进入升级通知子模块。
  32. 根据权利要求27所述的装置,其特征在于,在状态获取模块之前,还包括:
    升级通知发送模块,用于向各数据服务器发送第一升级通知,使各数据服务器进入升级准备状态,并使各数据服务器在接收到客户端的访问请求后发送第二升级通知至所述客户端,以使所述客户端进入升级准备状态。
PCT/CN2016/110722 2015-12-31 2016-12-19 一种分布式存储系统升级方法和装置 Ceased WO2017114213A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP16881002.6A EP3399692B1 (en) 2015-12-31 2016-12-19 Method and apparatus for upgrading distributed storage system
US15/781,617 US10884623B2 (en) 2015-12-31 2016-12-19 Method and apparatus for upgrading a distributed storage system
JP2018529541A JP6763580B2 (ja) 2015-12-31 2016-12-19 分散記憶システムをアップグレードするための方法および装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511034171.7 2015-12-31
CN201511034171.7A CN106936622B (zh) 2015-12-31 2015-12-31 一种分布式存储系统升级方法和装置

Publications (1)

Publication Number Publication Date
WO2017114213A1 true WO2017114213A1 (zh) 2017-07-06

Family

ID=59225662

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/110722 Ceased WO2017114213A1 (zh) 2015-12-31 2016-12-19 一种分布式存储系统升级方法和装置

Country Status (5)

Country Link
US (1) US10884623B2 (zh)
EP (1) EP3399692B1 (zh)
JP (1) JP6763580B2 (zh)
CN (1) CN106936622B (zh)
WO (1) WO2017114213A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111277626A (zh) * 2020-01-07 2020-06-12 平安科技(深圳)有限公司 服务器升级方法、装置、电子设备及介质
CN114014116A (zh) * 2021-10-19 2022-02-08 日立楼宇技术(广州)有限公司 一种电梯主控程序分段升级方法、系统、装置及存储介质

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525410B (zh) 2017-09-20 2021-05-18 华为技术有限公司 分布式存储系统升级管理的方法、装置及分布式存储系统
CN108037950B (zh) * 2017-12-27 2021-08-24 福建中金在线信息科技有限公司 一种信息删除方法、装置、电子设备及可读存储介质
CN108259578B (zh) * 2017-12-29 2021-07-16 北京元心科技有限公司 集群节点的升级方法及装置
CN108885110B (zh) * 2018-07-10 2022-04-08 达闼机器人有限公司 一种定位方法、定位装置、定位系统及可读存储介质
CN114270343B (zh) * 2019-10-23 2025-10-31 北京欧珀通信有限公司 数据请求方法、装置、系统、服务器及存储介质
CN111061357B (zh) * 2019-12-13 2021-09-03 北京奇艺世纪科技有限公司 节能方法、装置、电子设备及存储介质
CN113050963B (zh) * 2019-12-27 2024-08-20 北京搜狗科技发展有限公司 一种数据处理方法、装置和电子设备
CN111277633B (zh) * 2020-01-13 2022-02-01 北京奇艺世纪科技有限公司 一种请求处理方法、服务器、电子设备及存储介质
CN113391759B (zh) * 2020-03-13 2024-04-09 华为云计算技术有限公司 一种通信方法和设备
CN112084065B (zh) * 2020-08-24 2024-02-20 贵州易鲸捷信息技术有限公司 一种基于EsgynDB数据库的滚动重启的方法
CN113945246B (zh) * 2021-12-21 2022-03-11 深圳市聚能优电科技有限公司 储能的温湿度采集方法、系统、设备及存储介质
CN114866585B (zh) * 2022-04-24 2024-09-10 深圳市元征科技股份有限公司 远程升级方法、装置、系统及设备端接头
CN114785831B (zh) * 2022-04-25 2023-06-13 北京兴竹同智信息技术股份有限公司 用于绿通车辆检测的检测算法升级方法及绿通检测系统
CN115202323B (zh) * 2022-06-23 2025-01-21 重庆长安汽车股份有限公司 车辆的服务请求管理方法、装置、车辆及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901275A (zh) * 2010-08-23 2010-12-01 华中科技大学 一种分布式存储系统及其方法
US8103903B2 (en) * 2010-02-22 2012-01-24 International Business Machines Corporation Read-modify-write protocol for maintaining parity coherency in a write-back distributed redundancy data storage system
CN102694860A (zh) * 2012-05-25 2012-09-26 北京邦诺存储科技有限公司 一种云存储的数据处理方法、设备及系统
CN103095742A (zh) * 2011-10-28 2013-05-08 中国移动通信集团公司 用于p2p系统的节点加入方法及相应的p2p系统

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001084338A2 (en) * 2000-05-02 2001-11-08 Sun Microsystems, Inc. Cluster configuration repository
US7103650B1 (en) 2000-09-26 2006-09-05 Microsoft Corporation Client computer configuration based on server computer update
US20030120593A1 (en) 2001-08-15 2003-06-26 Visa U.S.A. Method and system for delivering multiple services electronically to customers via a centralized portal architecture
US7165250B2 (en) 2002-01-15 2007-01-16 International Business Machines Corporation System and method for priority based application server updates
US7149508B2 (en) 2003-02-05 2006-12-12 Samsung Electronics Co., Ltd. System and method for delta-based over-the-air software upgrades for a wireless mobile station
US7386114B1 (en) 2004-01-08 2008-06-10 Shortel, Inc. Distributed session-based data
US8171466B2 (en) 2006-05-16 2012-05-01 Oracle International Corporation Hitless application upgrade for SIP server architecture
US20080005733A1 (en) 2006-06-29 2008-01-03 Balaji Ramachandran Method and apparatus for updating firmware and software
CN101132573A (zh) * 2006-08-23 2008-02-27 中兴通讯股份有限公司 一种终端批量升级的实现方法
US8195824B2 (en) 2009-10-28 2012-06-05 Samsung Electronics Co., Ltd User service profile-based plug-in update method and apparatus for internet protocol television service
US8108734B2 (en) * 2009-11-02 2012-01-31 International Business Machines Corporation Intelligent rolling upgrade for data storage systems
KR20110068098A (ko) 2009-12-15 2011-06-22 삼성전자주식회사 가입자 댁내 장치의 소프트웨어 업그레이드 방법 및 장치
CN102118258A (zh) * 2009-12-31 2011-07-06 中兴通讯股份有限公司 吉比特无源光网络终端升级中异常情况的保护方法及系统
US8447894B2 (en) * 2011-01-05 2013-05-21 Alibaba Group Holding Limited Upgrading an elastic computing cloud system
SG11201401480QA (en) 2011-12-01 2014-07-30 Tencent Tech Shenzhen Co Ltd Method and system for upgrading software
KR101624626B1 (ko) 2011-12-09 2016-05-26 구글 테크놀로지 홀딩스 엘엘씨 실패 이벤트에 응답하여 펌웨어 업데이트 요청을 트리거하기 위한 장비 및 방법들
US20140007092A1 (en) 2012-06-30 2014-01-02 Microsoft Corporation Automatic transfer of workload configuration
US9379954B2 (en) 2013-03-15 2016-06-28 Chef Software Inc. Configuration management for a resource with prerequisites
US8621062B1 (en) 2013-03-15 2013-12-31 Opscode, Inc. Push signaling to run jobs on available servers
US20180241617A1 (en) * 2017-02-22 2018-08-23 Microsoft Technology Licensing, Llc System upgrade management in distributed computing systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8103903B2 (en) * 2010-02-22 2012-01-24 International Business Machines Corporation Read-modify-write protocol for maintaining parity coherency in a write-back distributed redundancy data storage system
CN101901275A (zh) * 2010-08-23 2010-12-01 华中科技大学 一种分布式存储系统及其方法
CN103095742A (zh) * 2011-10-28 2013-05-08 中国移动通信集团公司 用于p2p系统的节点加入方法及相应的p2p系统
CN102694860A (zh) * 2012-05-25 2012-09-26 北京邦诺存储科技有限公司 一种云存储的数据处理方法、设备及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111277626A (zh) * 2020-01-07 2020-06-12 平安科技(深圳)有限公司 服务器升级方法、装置、电子设备及介质
CN111277626B (zh) * 2020-01-07 2023-08-22 平安科技(深圳)有限公司 服务器升级方法、装置、电子设备及介质
CN114014116A (zh) * 2021-10-19 2022-02-08 日立楼宇技术(广州)有限公司 一种电梯主控程序分段升级方法、系统、装置及存储介质

Also Published As

Publication number Publication date
CN106936622A (zh) 2017-07-07
US20200264777A1 (en) 2020-08-20
JP6763580B2 (ja) 2020-09-30
US10884623B2 (en) 2021-01-05
EP3399692B1 (en) 2021-11-24
EP3399692A1 (en) 2018-11-07
EP3399692A4 (en) 2019-06-05
CN106936622B (zh) 2020-01-31
JP2019502202A (ja) 2019-01-24

Similar Documents

Publication Publication Date Title
WO2017114213A1 (zh) 一种分布式存储系统升级方法和装置
US9659078B2 (en) System and method for supporting failover during synchronization between clusters in a distributed data grid
CN106878363B (zh) 一种信息处理方法、装置及系统
CN108804119A (zh) 配置更新方法、装置、系统、配置中心、应用节点及介质
CN109842651A (zh) 一种业务不间断的负载均衡方法和系统
CN106034137A (zh) 用于分布式系统的智能调度方法及分布式服务系统
US9483493B2 (en) Method and system for accessing a distributed file system
CN111726388A (zh) 一种跨集群高可用的实现方法、装置、系统及设备
CN103368789B (zh) 集群监视器、用于监视集群的方法及计算机可读记录介质
CN113821168A (zh) 一种共享存储迁移系统、方法及电子设备和存储介质
EP3167372A1 (en) Methods for faciltating high availability storage services and devices thereof
CN114998020B (zh) 交易的处理方法及装置、处理器和电子设备
US11842063B2 (en) Data placement and recovery in the event of partition failures
WO2026040817A1 (zh) 一种支持多租户的多集群应用故障迁移方法及系统
CN105205160A (zh) 一种数据写入方法及装置
US20160011929A1 (en) Methods for facilitating high availability storage services in virtualized cloud environments and devices thereof
TWI735521B (zh) 一種分布式儲存系統升級方法和裝置
CN118659974A (zh) 数据采集器扩缩容方法、装置、计算机设备、可读存储介质、计算机程序产品
US10855521B2 (en) Efficient replacement of clients running large scale applications
CN115994045A (zh) 一种基于共享存储数据库集群的事务托管方法及装置
CN115664945A (zh) 一种并行清算方法与设备
CN114564153A (zh) 一种卷映射解除方法、装置、设备和存储介质
TW201828087A (zh) 分布式儲存系統的服務節點切換方法及裝置
US12591387B1 (en) Placements of data path service partitions
CN114499778B (zh) 维护云平台双活的装置、方法、系统和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16881002

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018529541

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016881002

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2016881002

Country of ref document: EP

Effective date: 20180731