TWI735521B - Method and device for upgrading distributed storage system - Google Patents

Method and device for upgrading distributed storage system Download PDF

Info

Publication number
TWI735521B
TWI735521B TW106102727A TW106102727A TWI735521B TW I735521 B TWI735521 B TW I735521B TW 106102727 A TW106102727 A TW 106102727A TW 106102727 A TW106102727 A TW 106102727A TW I735521 B TWI735521 B TW I735521B
Authority
TW
Taiwan
Prior art keywords
upgrade
feedback information
data server
data
client
Prior art date
Application number
TW106102727A
Other languages
Chinese (zh)
Other versions
TW201828090A (en
Inventor
朱家稷
趙樹起
林江彬
谷躍勝
Original Assignee
香港商阿里巴巴集團服務有限公司
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 香港商阿里巴巴集團服務有限公司 filed Critical 香港商阿里巴巴集團服務有限公司
Priority to TW106102727A priority Critical patent/TWI735521B/en
Publication of TW201828090A publication Critical patent/TW201828090A/en
Application granted granted Critical
Publication of TWI735521B publication Critical patent/TWI735521B/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申請實施例提供了一種分布式儲存系統升級方法和裝置,涉及分布式計算機技術領域。本申請的客戶端對於同一個待寫資料,同時向多個資料伺服器發送寫入請求,然後分析向多少個資料伺服器中寫入成功該待寫資料,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。資料伺服器則根據接收到的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還是處於不可升級狀態。升級控制伺服器可以根據資料伺服器的狀態以輪循的方式選擇通知所述資料伺服器進行升級操作,可以在不用停止上層服務的情況下,保證系統對客戶端的響應時間較低,提高了資料的可靠性,降低了用戶資料丟失的風險。 The embodiments of the present application provide a method and device for upgrading a distributed storage system, which relate to the technical field of distributed computers. The client of this application sends write requests to multiple data servers at the same time for the same data to be written, and then analyzes how many data servers have successfully written the data to be written, and judges whether the number of successful writes is greater than Specify the number, and send the first feedback information or the second feedback information to each data server that writes successfully according to the judgment result. The data server determines whether it is in an upgradeable state or a non-upgradable state according to the received first feedback information or second feedback information. The upgrade control server can choose to notify the data server to perform the upgrade operation in a round-robin manner according to the status of the data server. It can ensure that the response time of the system to the client is low without stopping the upper-layer service, and improve the data The reliability reduces the risk of user data loss.

Description

一種分布式儲存系統升級方法和裝置 Method and device for upgrading distributed storage system

本申請涉及分布式計算機技術領域,特別是涉及一種分布式儲存系統升級方法和一種分布式儲存系統升級裝置。 This application relates to the field of distributed computer technology, in particular to a distributed storage system upgrade method and a distributed storage system upgrade device.

高可用的分布式儲存系統是構建高可用服務的基石,分布式儲存系統由分布式的資料伺服器組成,它提供資料的高可靠性和存取的高可用性。其中高可靠性透過資料冗餘多備份或糾刪碼實現;高可用性透過快速的異常處理和故障切換實現。對分布式儲存系統進行版本升級,需要重啟系統的每個資料伺服器完成版本更新。 A highly available distributed storage system is the cornerstone of building highly available services. The distributed storage system consists of distributed data servers, which provide high reliability of data and high availability of access. Among them, high reliability is achieved through data redundancy and multiple backups or erasure codes; high availability is achieved through fast exception handling and failover. To upgrade the version of the distributed storage system, each data server of the system needs to be restarted to complete the version update.

在先技術中,對於分布式儲存系統的升級,存在如下幾種方案: In the prior art, there are several solutions for the upgrade of distributed storage systems:

其一,關閉上層服務,並停止整個分布式儲存系統,對分布式儲存系統所有的資料伺服器進行重啟升級,所有資料伺服器升級完畢後,再恢復上層服務。 First, shut down the upper-level services, stop the entire distributed storage system, restart and upgrade all the data servers in the distributed storage system, and restore the upper-level services after all the data servers are upgraded.

但是,該種方案導致上層服務整體不可用,其服務的不可用時間很長,對於一些需要高可用的服務是不可接受 的。 However, this kind of solution leads to the overall unavailability of upper-layer services, and the unavailability of its services is very long, which is unacceptable for some services that require high availability.

其二,不停上層服務,以輪循的方式重啟每個資料伺服器,客戶端向多個(該多個為預設需要備份的個數)資料伺服器發送寫入請求,以向資料伺服器寫入待寫資料,如果請求失敗,則客戶端向上述資料伺服器進行重試,以保證客戶端的存取繼續進行。 The second is to keep the upper-level services and restart each data server in a round-robin manner. The client sends write requests to multiple data servers (the number is the number that needs to be backed up by default) to the data server. If the request fails, the client will retry the above-mentioned data server to ensure that the client's access continues.

但是,該種方案中,如果客戶端等待該資料伺服器恢復並重試,而由於資料伺服器一般重啟恢復的時間在秒級,而高實時的資料存取延時在10-100MS級,該種重試策略將極大影響伺服器的響應時間。 However, in this solution, if the client waits for the data server to recover and retry, the data server generally restarts and recovers in seconds, and the high real-time data access delay is 10-100MS. The trial strategy will greatly affect the response time of the server.

其三,不停上層服務,以輪循的方式重啟每個資料伺服器,客戶端向多個(該多個為預設需要備份的個數)資料伺服器發送寫入請求,以向資料伺服器寫入待寫資料如果請求失敗,則客戶端忽略這些資料伺服器進行重試,以保證客戶端的存取繼續進行。 Third, the upper-level services are not stopped, and each data server is restarted in a round-robin manner. The client sends write requests to multiple data servers (the number is the number that needs to be backed up by default) to the data server. If the request fails to write the data to be written by the server, the client ignores these data servers and retry to ensure that the client's access continues.

但是,該種方案中,客戶端暫時忽略請求失敗的資料伺服器,分布式儲存系統而對這些資料伺服器的輪循升級繼續進行。如果分布式儲存系統中各個資料伺服器輪循重啟過快,而如果客戶端只對一個資料伺服器寫入成功,從而只有一個資料伺服器寫入成功,假使恰巧輪循時這個資料伺服器的磁碟或者機器損壞,由於該客戶端的待寫資料沒有寫入到其他資料伺服器中,則會造成用戶資料的丟失。即使延長輪循重啟時間,但是分布式儲存系統的大集群在長時間內輪循時也會有非預期的磁碟和機器異常,還 是會產生對客戶端的資料只有一個資料伺服器寫入成功的情況,使用戶資料處於極大的丟失風險中。因此該種方案的雖然解決了延遲問題,但是資料的可靠性不足。 However, in this solution, the client temporarily ignores the failed data servers, and the distributed storage system continues the round-robin upgrade of these data servers. If each data server in the distributed storage system restarts too quickly, and if the client writes to only one data server successfully, then only one data server writes successfully. If the disk or machine is damaged, because the client's data to be written is not written to other data servers, the user's data will be lost. Even if the cycle restart time is extended, the large clusters of distributed storage systems will have unexpected disk and machine abnormalities during the cycle for a long time, and the client data will only be successfully written to the data server. Circumstances put user data at great risk of loss. Therefore, although this scheme solves the delay problem, the reliability of the data is insufficient.

鑒於上述問題,提出了本申請實施例以便提供一種克服上述問題或者至少部分地解決上述問題的一種分布式儲存系統升級方法和相應的一種分布式儲存系統升級裝置。 In view of the above problems, the embodiments of the present application are proposed to provide a distributed storage system upgrade method and a corresponding distributed storage system upgrade device that overcome the above problems or at least partially solve the above problems.

為了解決上述問題,本申請公開了一種分布式儲存系統升級方法,應用於客戶端,包括:對同一份待寫資料,向多個資料伺服器發送寫入請求;接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數;如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊;如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;其中,所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述資料伺服器的狀態供升級控制伺服器以輪循的方式通知所述資料伺服器進行升級操作。 In order to solve the above problems, this application discloses a distributed storage system upgrade method, applied to the client, including: sending a write request to multiple data servers for the same piece of data to be written; Respond, and determine whether the number of successful writes is greater than the specified number according to the response; if the number of successful writes is greater than the specified number, send the first feedback information to each data server that successfully writes; if write If the number of successful entries is not greater than the specified number, the second feedback information is sent to each data server that has been successfully written; wherein the first feedback information or the second feedback information is used by the data server to determine its own status The status includes an upgradeable status and a non-upgradable status; the status of the data server is for the upgrade control server to notify the data server to perform an upgrade operation in a round-robin manner.

本申請還公開了一種分布式儲存系統升級方法,應用於資料伺服器,包括: 接收客戶端發送的第一反饋資訊或者第二反饋資訊;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述狀態供升級控制伺服器以輪循的方式選擇通知所述資料伺服器進行升級操作。 This application also discloses a distributed storage system upgrade method, applied to a data server, including: receiving first feedback information or second feedback information sent by a client; the first feedback information or second feedback information is based on the client After sending a write request to multiple data servers for the same piece of data to be written, the comparison result of the number of successful writes and the specified number is obtained; in the case of not being upgraded, according to the first feedback information or The second feedback information determines the status of the data server itself; the status includes an upgradeable status and an unupgradable status; the status is used by the upgrade control server to select and notify the data server to perform an upgrade operation in a round-robin manner.

本申請還公開了一種分布式儲存系統升級方法,應用於升級控制伺服器,包括:獲取各資料伺服器的狀態;所述狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;所述資料伺服器的狀態根據所述第一反饋資訊或者第二反饋資訊確定;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;所述資料伺服器根據所述通知進行升級操作。 The application also discloses a distributed storage system upgrade method, which is applied to upgrade control servers, including: obtaining the status of each data server; the status includes an upgradeable status and an unupgradable status, and each data server has a status 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 sent to multiple data servers based on the client side for the same piece of data to be written After the request is entered, the comparison result of the number of successful writes and the specified number is obtained; at least one data server in an upgradeable state is notified in a round-robin manner to perform the upgrade operation; the data server is upgraded according to the notification operate.

本申請還公開了一種分布式儲存系統升級裝置,應用於客戶端,包括:請求發送模組,用於對同一份待寫資料,向多個資料伺服器發送寫入請求; 判斷模組,用於接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數;第一反饋模組,用於如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊;第二反饋模組,用於如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;其中,所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述資料伺服器的狀態供升級控制伺服器以輪循的方式通知所述資料伺服器進行升級操作。 The application also discloses a distributed storage system upgrade device, which is applied to the client, and includes: a request sending module, which is used to send write requests to multiple data servers for the same piece of data to be written; After receiving the response from each data server, and judging whether the number of successful writes is greater than the specified number according to the response; the first feedback module is used for if the number of successful writes is greater than the specified number, then Send the first feedback information to each successfully written data server; the second feedback module is used to send the second feedback to each successfully written data server if the number of successful writes is not greater than the specified number Information; wherein 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-upgradable state; the state of the data server is used for the upgrade control server The data server is notified to perform the upgrade operation in a round-robin manner.

本申請還公開了一種分布式儲存系統升級裝置,應用於資料伺服器,包括:反饋資訊接收模組,用於接收客戶端發送的第一反饋資訊或者第二反饋資訊;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;狀態確定模組,用於在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述狀態供升級控制伺服器以輪循的方式選擇通知所述資料伺服器進行升級操作。 The application also discloses a distributed storage system upgrade device, which is applied to a data server, and includes: a feedback information receiving module for receiving first feedback information or second feedback information sent by a client; the first feedback information Or the second feedback information is obtained based on the comparison result of the number of successful writes and the specified number after the client sends a write request to multiple data servers for the same piece of data to be written; In the case of not being upgraded, the state of the data server itself is determined based on the first feedback information or the second feedback information; the state includes an upgradeable state and an unupgradable state; the state is used by the upgrade control server to recycle The data server is selected to notify the data server to perform the upgrade operation in a circular manner.

本申請還公開了一種分布式儲存系統升級裝置,應用於升級控制伺服器,包括:狀態獲取模組,用於獲取各資料伺服器的狀態;所述 狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;所述資料伺服器的狀態根據所述第一反饋資訊或者第二反饋資訊確定;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;升級通知模組,用於以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;所述資料伺服器根據所述通知進行升級操作。 The application also discloses a distributed storage system upgrade device, which is applied to the upgrade control server, and includes: a status acquisition module for acquiring the status of each data server; the status includes an upgradeable status and a non-upgradable status, each Each data server has a status; the status of the data server is determined according to the first feedback information or the second feedback information; After multiple data servers send write requests, the comparison result of the number of successful writes and the specified number is obtained; the upgrade notification module is used to notify at least one data server that is in an upgradeable state in a round-robin manner. Upgrade operation; the data server performs an upgrade operation according to the notification.

本申請實施例包括以下優點:本申請實施例,在分布式儲存系統啟動升級流程後,對於存取該分布式儲存系統的客戶端,讓各個客戶端對於同一個待寫資料,同時向多個資料伺服器發送該針對該待寫資料的寫入請求,然後分析在多少個資料伺服器中寫入成功該待寫資料,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。對於資料伺服器,根據接收到的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還是處於不可升級狀態。對於升級控制伺服器,則可以根據資料伺服器的狀態以輪循的方式選擇通知所述資料伺服器進行升級操作。透過上述過程,本申請實施例中,在升級控制伺服器在以輪循的方式控制各資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既 可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險。 The embodiments of the present application include the following advantages: in the embodiments of the present application, after the distributed storage system starts the upgrade process, for the clients accessing the distributed storage system, each client can simultaneously send multiple messages to multiple clients for the same data to be written. The data server sends the write request for the data to be written, and then analyzes how many data servers have successfully written the data to be written, determines whether the number of successful writes is greater than the specified number, and sends the data to Each successfully written data server sends the first feedback information or the second feedback information. For the data server, according to the received first feedback information or second feedback information, it is determined whether it is in an upgradeable state or a non-upgradable state. For the upgrade control server, the data server can be selected to notify the data server to perform the upgrade operation in a round-robin manner according to the status of the data server. Through the above process, in this embodiment of the application, when the upgrade control server controls each data server in a round-robin manner to upgrade, the client controls the state of the data server and guarantees the data to be written by any client Write at least the specified number of data servers for backup. Therefore, without stopping the upper-layer services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data and greatly reduce The risk of user data loss is eliminated.

510‧‧‧請求發送模組 510‧‧‧Request sending module

520‧‧‧判斷模組 520‧‧‧Judgment Module

530‧‧‧第一反饋模組 530‧‧‧First Feedback Module

540‧‧‧第二反饋模組 540‧‧‧Second Feedback Module

610‧‧‧反饋資訊接收模組 610‧‧‧Feedback information receiving module

620‧‧‧狀態確定模組 620‧‧‧Status determination module

710‧‧‧狀態獲取模組 710‧‧‧Status Obtaining Module

720‧‧‧升級通知模組 720‧‧‧Upgrade notification module

810‧‧‧客戶端 810‧‧‧Client

820‧‧‧資料伺服器 820‧‧‧Data Server

830‧‧‧升級控制伺服器 830‧‧‧Upgrade control server

811‧‧‧請求發送模組 811‧‧‧Request sending module

812‧‧‧判斷模組 812‧‧‧Judgment Module

813‧‧‧第一反饋模組 813‧‧‧First Feedback Module

814‧‧‧第二反饋模組 814‧‧‧Second Feedback Module

821‧‧‧資料儲存模組 821‧‧‧Data Storage Module

822‧‧‧反饋資訊接收模組 822‧‧‧Feedback information receiving module

823‧‧‧狀態確定模組 823‧‧‧Status determination module

824‧‧‧升級模組 824‧‧‧Upgrade Module

831‧‧‧狀態獲取模組 831‧‧‧Status Obtaining Module

832‧‧‧升級通知模組 832‧‧‧Upgrade notification module

圖1是本申請的客戶端側的一種分布式儲存系統升級方法實施例的步驟流程圖;圖2是本申請的資料伺服器側的一種分布式儲存系統升級方法實施例的步驟流程圖;圖3是本申請的升級控制伺服器側的一種分布式儲存系統升級方法實施例的步驟流程圖;圖4是本申請的一種分布式儲存系統升級系統實施例的步驟流程圖;圖5是本申請的客戶端側的一種分布式儲存系統升級裝置實施例的結構方塊圖;圖6是本申請的客戶端側的一種分布式儲存系統升級裝置實施例的結構方塊圖;圖7是本申請的資料伺服器側的一種分布式儲存系統升級裝置實施例的結構方塊圖;圖8是本申請的升級控制伺服器側的一種分布式儲存系統升級裝置實施例的結構方塊圖;圖8A是本申請實施例的分布式儲存系統的架構示例。 FIG. 1 is a step flow diagram of an embodiment of a method for upgrading a distributed storage system on the client side of the present application; FIG. 2 is a step flow diagram of an embodiment of a method for upgrading a distributed storage system on the data server side of the present application; 3 is a step flow chart of an embodiment of a distributed storage system upgrade method on the upgrade control server side of this application; FIG. 4 is a step flow chart of an embodiment of a distributed storage system upgrade system of this application; FIG. 5 is this application A structural block diagram of an embodiment of a distributed storage system upgrade device on the client side of the present application; Figure 6 is a structural block diagram of an embodiment of a distributed storage system upgrade device on the client side of the present application; Figure 7 is the data of the present application A structural block diagram of an embodiment of a distributed storage system upgrade device on the server side; FIG. 8 is a structural block diagram of an embodiment of a distributed storage system upgrade device on the upgrade control server side of the present application; FIG. 8A is an implementation of the present application Example of the architecture of a distributed storage system.

為使本申請的上述目的、特徵和優點能夠更加明顯易懂,下面結合附圖和具體實施方式對本申請作進一步詳細的說明。 In order to make the above objectives, features, and advantages of the application more obvious and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific implementations.

本申請實施例的核心構思之一在於,對於分布式儲存系統的資料伺服器、升級控制伺服器進行了創造性的更改,並且對存取資料伺服器的客戶端,也提供了新的執行邏輯。在分布式儲存系統啟動升級流程後,對於存取該分布式儲存系統的客戶端,對於存取該分布式儲存系統的客戶端,每個客戶端對於同一個待寫資料,同時向多個資料伺服器發送針對該待寫資料的寫入請求,然後分析在多少個資料伺服器中寫入成功該待寫資料,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。對於資料伺服器,根據接收到的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還是處於不可升級狀態。對於升級控制伺服器,則可以根據資料伺服器的狀態以輪循的方式選擇通知所述資料伺服器進行升級操作。透過上述過程,在升級控制伺服器在以輪循的方式控制可升級狀態的資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險;並且可容忍升級過程中非預期的機器異常,保證 服務不受影響。 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. After the distributed storage system starts the upgrade process, for the client accessing the distributed storage system, for the client accessing the distributed storage system, each client is for the same data to be written, and simultaneously sends multiple data The server sends a write request for the data to be written, and then analyzes how many data servers have successfully written the data to be written, judges whether the number of successful writes is greater than the specified number, and writes to each data according to the judgment result The data server that has successfully entered sends the first feedback information or the second feedback information. For the data server, according to the received first feedback information or second feedback information, it is determined whether it is in an upgradeable state or a non-upgradable state. For the upgrade control server, the data server can be selected to notify the data server to perform the upgrade operation in a round-robin manner according to the status of the data server. Through the above process, when the upgrade control server controls the data server in an upgradeable state in a round-robin manner to upgrade, the client controls the state of the data server and ensures that the data to be written by any client is at least written A designated number of data servers are used for backup. Therefore, without stopping the upper-level services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data and greatly reduce the user data. The risk of loss; and can tolerate unexpected machine abnormalities during the upgrade process to ensure that the service is not affected.

實施例一 Example one

本申請實施例應用於客戶端側。 The embodiments of this application are applied to the client side.

參照圖1,示出了本申請的一種分布式儲存系統升級方法實施例的步驟流程圖,具體可以包括如下步驟:步驟110,對同一份待寫資料,向多個資料伺服器發送寫入請求。 1, there is shown a step flow chart of an embodiment of a distributed storage system upgrade method of the present application, which may specifically include the following steps: Step 110, for the same piece of data to be written, send write requests to multiple data servers .

在本申請實施例中,對於一客戶端A,在分布式儲存系統的升級過程中,當該客戶端要向資料伺服器寫入待寫資料A1時,該客戶端A會向多個資料伺服器發送針對該待寫資料A的寫入請求。 In the embodiment of the present application, for a client A, during the upgrade process of the distributed storage system, when the client wants to write data A1 to be written to the data server, the client A will send data to multiple data servers. The device sends a write request for the material A to be written.

在本申請實施例中,可以預先設置多個資料伺服器的個數R,比如10個。具體的個數R本申請實施例不對其加以限制。 In the embodiment of the present application, the number R of multiple data servers may be preset, for example, 10. The specific number R is not limited in the embodiment of the application.

那麼對於該待寫資料,其可以向R資料伺服器發送寫入請求,然後進入步驟120。 Then, for the data to be written, it can send a write request to the R data server, and then enter step 120.

可以理解,在實際應用中,該客戶端A可先向分布式儲存系統的調度伺服器發送R個寫入請求,然後由該調度伺服器控制該R個寫入請求分配給哪R個資料伺服器。 It can be understood that in practical applications, the client A can first send R write requests to the dispatch server of the distributed storage system, and then the dispatch server controls which R data servers the R write requests are allocated to Device.

需要說明的是,不同客戶端針對其待寫資料,向R個資料伺服器發送寫入請求,各自的R個資料伺服器可以相同也可以不同。 It should be noted that different clients send write requests to R data servers for the data to be written, and the respective R data servers may be the same or different.

在本申請另一優選的實施例中,在步驟110之前,還 包括步驟101-102:步驟101,在存取一資料伺服器時,接收由資料伺服器發送的第二升級通知。 In another preferred embodiment of the present application, before step 110, steps 101-102 are further included: step 101, when accessing a data server, receive a second upgrade notification sent by the data server.

步驟102,根據所述第二升級通知進入升級準備狀態。 Step 102: Enter an upgrade preparation state according to the second upgrade notification.

在本申請實施例中,分布式儲存系統的升級控制伺服器首先通知各個資料伺服器進入升級準備狀態。那麼各個資料伺服器則可以向存取該資料伺服器的客戶端發送第二升級通知,以使客戶端進入升級準備狀態。 In the embodiment of the present application, the upgrade control server of the distributed storage system first notifies each data server to enter the 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.

相應的,對於客戶端A來說,其存取進入了升級準備狀態的一資料伺服器後,該資料伺服器則回傳第二升級通知給該客戶端。該客戶端接收到該第二升級準備通知後,則根據該第二升級準備通知進入升級準備狀態。 Correspondingly, for the client A, after it accesses a data server that has entered 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.

在本申請實施例中,如果客戶端是透過瀏覽器的網頁的方式存取資料伺服器,本申請可以透過瀏覽器打開的網頁,給瀏覽器傳輸一個升級腳本,瀏覽器接收到該腳本後,則可以執行該腳本,使客戶端進入升級準備狀態。如果客戶端是透過支付寶APP等方式存取資料伺服器,本申請可以預先在上述APP中添加升級處理邏輯,該APP在接收到第二升級通知後,則啟用升級處理邏輯,使客戶端進入升級準備狀態。當然,具體方式本申請實施例不對其加以限制。 In the embodiment of this application, if the client accesses the data server through the webpage of the browser, this application can transmit an upgrade script to the browser through the webpage opened by the browser. After the browser receives the script, Then you can execute the script to make the client enter the upgrade preparation state. If the client accesses the data server through the Alipay APP, etc., this application can add upgrade processing logic to the above APP in advance. After the APP receives the second upgrade notification, the upgrade processing logic will be activated to enable the client to enter the upgrade Ready state. Of course, the specific manner is not limited by the embodiment of the present application.

當客戶端進入升級準備狀態,則可以進入本申請實施例的步驟110、120、130、140等由客戶端側執行的步 驟。 When the client enters the upgrade preparation state, it can enter steps 110, 120, 130, 140 and other steps executed by the client in the embodiment of the present application.

步驟120,接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數;如果寫入成功的個數大於指定個數,則進入步驟130;如果寫入成功的個數不大於指定個數,則進入步驟140。 Step 120: Receive the response returned by each data server, and determine whether the number of successful writes is greater than the specified number according to the response; if the number of successful writes is greater than the specified number, go to step 130; If the number of successful entries is not greater than the specified number, then step 140 is entered.

在本申請實施例中,在正常情況下,各資料伺服器接收到客戶端發送的針對同一份待寫資料的寫入請求後,會相應地回傳響應給客戶端。當然,如果某個資料伺服器正在升級,或者當掉,則不會回傳響應給客戶端。 In the embodiment of the present application, under normal circumstances, after each data server receives a write request for the same piece of data to be written from the client, it will return a response to the client accordingly. Of course, if a data server is being upgraded or crashed, no response will be sent back to the client.

在本申請實施例中,客戶端針對待寫資料A1,在向R個資料伺服器發送寫入請求後,則可以週期性的檢查接收到的響應。如週期性的檢查是否接收到該某個或某些個資料伺服器的響應。如果在指定時間週期內未接收到某或者某幾個資料伺服器的響應,則說明該待寫資料A1沒能成功寫入該某個或者某幾個資料伺服器中。如果在指定時間週期內接收到某個或某幾個資料伺服器的響應,則可以分析該響應是寫入成功響應,還是寫入失敗響應;如果是寫入成功響應,則說明該寫入成功響應對應的資料伺服器對待寫資料A1的備份成功,也即寫入成功;如果是寫入失敗響應,則說明該寫入失敗響應對應的資料伺服器對待寫資料A1的備份失敗,也即寫入失敗。 In the embodiment of the present application, the client can periodically check the received response after sending a write request to the R data servers for the data A1 to be written. For example, periodically check whether a response from the data server or servers is received. If a response from a certain data server or several data servers is not received within a specified time period, it means that the data to be written A1 has not been successfully written into the certain data server or several data servers. If you receive a response from one or several data servers within a specified time period, you can analyze whether the response is a successful write response or a write failed response; if it is a successful write response, the write is successful The data server responds to the success of the backup of the data to be written to A1, that is, the write is successful; if it is a write failure response, it means that the data server corresponding to the write failure response fails to backup the data to be written to A1, that is, the write Entry failed.

需要說明的是,對於R個資料伺服器的響應,客戶端A是週期性的檢查M是否大於N。該週期如1ms(微秒),當然,該週期可以根據需要設定,本申請不對其加 以限制。 It should be noted that, for the responses of R data servers, client A periodically checks whether M is greater than N. The period is for example 1ms (microseconds). Of course, the period can be set as needed, and this application does not impose restrictions on it.

那麼,本申請可以基於上述判斷,統計待寫資料A1向資料伺服器寫入成功的個數。 Then, this application can count the number of successful writing of the data A1 to the data server based on the above judgment.

在本申請實施例中,可以預設一個寫入成功的指定個數,該指定個數為寫入成功的最低個數,也可以理解為一個客戶端的待寫資料備份成功的資料伺服器的個數,該指定個數比如N個,該N<R,N、R均為正整數。在實際中可以預設N=3,R=10,當然,N和R的值可以根據實際需求設置,本申請不對其加以限制。 In the embodiment of the present application, a designated number of successful writes can be preset, and the designated number is the lowest number of successful writes. It can also be understood as the number of data servers for which the data to be written is successfully backed up by a client. Number, the designated number, such as N, where N<R, N and R are both positive integers. In practice, N=3 and R=10 can be preset. Of course, the values of N and R can be set according to actual needs, and this application does not limit them.

那麼客戶端A將其當前的待寫資料A1向R個資料伺服器發送寫入請求後,如果有M個資料伺服器回傳寫入成功響應,那麼則判斷是否M>N。如果M>N,則進入步驟130;如果M

Figure 106102727-A0202-12-0012-11
N,則進入步驟140。其中,M
Figure 106102727-A0202-12-0012-12
0,且為整數。 Then, after the client A sends its current data A1 to be written to the R data servers, if there are M data servers returning a write success response, then it is judged whether M>N. If M>N, go to step 130; if M
Figure 106102727-A0202-12-0012-11
N, go to step 140. Among them, M
Figure 106102727-A0202-12-0012-12
0, and is an integer.

當然,在實際應用中,由於資料伺服器是按照機架放置的,那麼這R個資料伺服器可以分佈在不同的機架上,進一步提高容災備份效果。最優的情況是,該R個資料伺服器完全分佈在不同的機架上。 Of course, in practical applications, since the data servers are placed according to racks, the R data servers can be distributed on different racks to further improve the effect of disaster recovery and backup. The optimal situation is that the R data servers are completely distributed on different racks.

步驟130,向各寫入成功的資料伺服器發送第一反饋資訊。 Step 130: Send the first feedback information to each data server that has been successfully written.

由於可以成功接收客戶端的寫入請求,並將其中的待寫資料進行備份,則表示這M個資料伺服器是可用的。那麼客戶端可以向該M個資料伺服器發送第一反饋消息。該第一反饋消息可以如OK消息,該OK消息告訴資 料伺服器可以將自身的狀態設置為可升級狀態。 Since the write request from the client can be successfully received and the data to be written can be backed up, it means that the M data servers are available. Then the client can send the first feedback message to the M data servers. The first feedback message may be an OK message, and the OK message tells the data server that it can set its own state to an upgradeable state.

當然,實際中資料伺服器如何根據該第一反饋消息設置自身的狀態為可升級狀態,本申請在實施例二中進行詳細描述。 Of course, in practice, how the data server sets its own state to the upgradeable state according to the first feedback message is described in detail in the second embodiment of this application.

步驟140,向各寫入成功的資料伺服器發送第二反饋資訊。 Step 140: Send second feedback information to each data server that has been successfully written.

其中,所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述資料伺服器的狀態供升級控制伺服器以輪循的方式通知所述資料伺服器進行升級操作。 Wherein, the first feedback information or the second feedback information is used for the data server to determine its own state; the state includes an upgradeable state and a non-upgradable state; the state of the data server is used by the upgrade control server to determine its own status; The data server is notified to perform the upgrade operation in a circular manner.

如果M

Figure 106102727-A0202-12-0013-13
N,由於這M個資料伺服器是可用的,那麼客戶端可以向該M個資料伺服器發送第二反饋消息。該第二反饋消息可以如HOLD心跳消息,該HOLD消息告訴資料伺服器可以將自身的狀態設置為不可升級狀態。當然,實際中資料伺服器如何根據該第二反饋消息設置自身的狀態為不可升級狀態,本申請在實施例二中進行詳細描述。 If M
Figure 106102727-A0202-12-0013-13
N. Since the M data servers are available, the client can send a second feedback message to the M data servers. The second feedback message may be a HOLD heartbeat message, and the HOLD message tells the data server that it can set its own state to a non-upgradeable state. Of course, in practice, how the data server sets its own state to the non-upgradeable state according to the second feedback message is described in detail in the second embodiment of this application.

需要說明的是,對於M<N的情況,客戶端重新向新的資料伺服器發送寫入請求,直到保證M至少等於N。 It should be noted that for the case of M<N, the client re-sends a write request to the new data server until it is guaranteed that M is at least equal to N.

對於分布式儲存系統中的各個未升級的資料服務來說,當其接收到第一反饋資訊或第二反饋資訊後,則可以根據第一反饋資訊或第二反饋資訊確定自身是處於可升級狀態還是處於不可升級狀態。其中可升級狀態比如OK,不可升級狀態比如HOLD。比如,如果某個資料伺服器收 到了第二反饋資訊,則該資料伺服器則可將自身的狀態設置為不可升級狀態。如果某個資料伺服器收到的了第一反饋資訊,則可將自身的狀態設置為可升級狀態。 For each unupgraded data service in the distributed storage system, when it receives the first feedback information or the second feedback information, it can determine that it is in an upgradeable state based on the first feedback information or the second feedback information Still in a non-upgradeable state. Among them, the upgradeable state is such as OK, and the non-upgradable state is such as HOLD. For example, if a certain data server receives the second feedback information, the data server can set its own status to a non-upgradeable status. If a certain data server receives the first feedback information, it can set its own status to an upgradeable status.

當然,在實際應用中,由於上層服務不停止,而資料伺服器又在不斷升級,所以上述R個資料伺服器中也可能存在升級完畢的資料伺服器。那麼對於已升級的資料伺服器,其收到的任何上述反饋資訊,不會再做進一步處理,其狀態保持為已升級狀態。 Of course, in actual applications, since the upper-layer services are not stopped and the data servers are constantly being upgraded, there may also be data servers that have been upgraded among the above R data servers. Then, for the upgraded data server, any of the above feedback information it receives will not be processed further, and its status will remain upgraded.

對於資料伺服器如何根據接收到第一反饋資訊或第二反饋資訊確定自身的狀態的具體過程,本申請在實施例二中進行詳細描述。 The specific process of how the data server determines its own state according to the received first feedback information or the second feedback information is described in detail in the second embodiment of this application.

進一步的,各個資料伺服器的狀態可以由升級控制伺服器以輪循的方式通知所述資料伺服器進行升級操作。對於升級控制伺服器如何以輪循的方式通知所述資料伺服器進行升級操作的具體過程,本申請在實施例三中描述。 Further, the status of each data server can be notified by the upgrade control server in a round-robin manner to perform the upgrade operation. The specific process of how the upgrade control server notifies the data server to perform the upgrade operation in a round-robin manner is described in the third embodiment of this application.

在本申請另一優選的實施例中,步驟140,包括子步驟141-144:子步驟141,如果所述寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊。 In another preferred embodiment of the present application, step 140 includes sub-steps 141-144: sub-step 141, if the number of successful writes is equal to the specified number, send to each data server that successfully writes The second feedback information.

如前述客戶端A對待寫資料A1,第一次發送到了R個資料伺服器,那麼如果監控到寫入成功響應的個數M=N,則可以直接向該M個寫入成功的資料伺服器發送第二反饋資訊。 For example, the aforementioned client A sends the data to be written A1 to R data servers for the first time, then if the number of successful write responses M=N is monitored, it can directly write to the M data servers that have successfully written Send the second feedback information.

子步驟142,如果所述寫入成功的小於指定個數,則 針對所述待寫資料向所述多個資料伺服器之外的至少一個資料伺服器發送寫入請求。 In sub-step 142, if the number of successful writes is less than the specified number, send a write request to at least one data server other than the multiple data servers for the data to be written.

子步驟143,接收所述至少一個資料伺服器回傳的響應,並結合已寫入成功的個數判斷當前寫入成功的個數是否等於指定個數。如果當前寫入成功的個數等於指定個數,則進入子步驟144;果當前寫入成功的個數小於指定個數,則進入子步驟142;子步驟144,如果當前寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊。 Sub-step 143, receiving the response returned by the at least one data server, and judging whether the current number of successful writes is equal to the specified number based on the number of successful writes. If the current number of successful writes is equal to the specified number, then go to sub-step 144; if the current number of successful writes is less than the specified number, then go to sub-step 142; sub-step 144, if the current number of successful writes is If the number is equal to the specified number, the second feedback information is sent to each data server that has been successfully written.

對於子步驟142-144如前述客戶端A對待寫資料A1,第一次發送到了R個資料伺服器,那麼如果監控到響應成功的個數M<N,則再次至少向N-M個資料伺服器發送寫入請求。再接收該N-M個資料伺服器的響應,如果該N-M個資料伺服器中回傳寫入成功響應的個數加上前面R各資料伺服器的寫入成功響應的個數得到的M,如果此時M=N,則向各寫入成功的資料伺服器發送第二反饋資訊。此時M的值變化,但是如果此時還是M<N,則再次至少向N-M個資料伺服器發送寫入請求,如此類推,直至M=N,然後向各寫入成功的資料伺服器發送第二反饋資訊。 For sub-steps 142-144, as the aforementioned client A sends the data A1 to be written for the first time to R data servers, then if the number of successful responses M<N is monitored, it will send to at least NM data servers again Write request. Then receive the response of the NM data servers, if the number of successful write responses returned from the NM data servers plus the number of successful write responses of the previous R data servers, M is obtained. If this When M=N, the second feedback information is sent to each data server that has been successfully written. At this time, the value of M changes, but if M<N at this time, the write request is sent to at least NM data servers again, and so on, until M=N, and then the first data server is sent to each successfully written data server. 2. Feedback information.

進一步的,比如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,響應時間總的來說也很短,不會太影響客戶端的響應時延,用戶對上述情況的響應時延感覺也比等待重啟的情況低很多。 Further, for example, R=10, N=5, client A sends the data A1 to be written to 10 data servers for the first time, then if the number of successful write responses M=3 is monitored, then at least the data will be sent to 5-3=2 data servers send write requests at a time, continue to monitor the number of successful write responses of the two data servers, and find that only one successful write response is received, then add the previously recorded 3 , Get M=4. Then send write requests to at least 5-4=1 data servers again. Continue to monitor and judge according to the above method, when M=N=5, then send the second feedback information to each data server that has been successfully written. Of course, in practical applications, when M<N, in the above process, after each write request is sent, the data server that writes successfully can directly send the second feedback message, instead of waiting for all of M=N and then send it together. Of course, in practical applications, since the response of the data server is periodically checked, if the specified period T, such as 3*T, it is determined that M<N, then at least NM data servers will be sent again Write request. In each cycle, the judgment of M and N is the same. Under normal circumstances, M=N can be determined in a few cycles, and the response time is generally very short, which will not affect the response delay of the client too much. The response delay of the user to the above situation is also lower than that of waiting for the restart. a lot of.

如此,可以在保證客戶端的待備份資料在多個資料庫中備份成功,同時不影響上傳服務的正常使用。 In this way, it can ensure that the client's to-be-backed-up data is successfully backed up in multiple databases without affecting the normal use of the upload service.

在本申請另一優選的實施例中,在步驟140之後,還包括步驟150:步驟150,當出現新的待寫資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象,進入步驟120。 In another preferred embodiment of the present application, after step 140, step 150 is further included: step 150, when new data to be written appears, target multiple data servers including the data server that has been successfully written before ,Go to step 120.

可以理解,對於M=N的情況,由於客戶端向各寫入成功的資料伺服器回傳了HOLD心跳資訊,那麼這些資料 伺服器設置自身為不可升級狀態,如HOLD狀態。為了更方便的清除該客戶端對這些資料伺服器的限定,本申請實施例則在客戶端後續對新的待寫資料發送寫入請求時,繼續向之前的R個資料伺服器發送。 It can be understood that for the case of M=N, since the client sends back HOLD heartbeat information to each successfully written data server, these data servers are set to a non-upgradeable state, such as the HOLD state. In order to more conveniently clear the client's restrictions on these data servers, in the embodiment of the present application, when the client subsequently sends a write request to the new data to be written, it continues to send to the previous R data servers.

比如客戶端A的待寫資料A1,之前向資料伺服器U1、U2......U10這10個資料伺服器發送了寫入請求,然後判斷M=N,則對於客戶端A的待寫資料A2,則可以繼續向U1、U2......U10這10個資料伺服器發送了寫入請求,繼續步驟120的判斷。 For example, client A's data to be written A1, previously sent write requests to the 10 data servers U1, U2...U10, and then judged that M=N, then for client A's pending data Write data A2, you can continue to send write requests to the 10 data servers U1, U2...U10, and continue with the judgment in step 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個資料伺服器。 It can be understood that, for the case of sub-step 142, the R data servers include M successfully written, and the remaining R-M data servers are selected from the data servers that failed to write. For example, R=10, N=3, for client A's data A1 to be written, the write request is sent to the 10 data servers U1, U2...U10 for the first time, and only U1, U2 writes The input is successful, and then a write request is sent to U11, U12 for the second time, and U11 is written successfully; then for the client's data to be written A2, you can choose U1, U2, U11, U4, U5...U10 These 10 data servers send write requests to these 10 data servers. Of course, you can also choose to include U1, U2, U11 and other data servers to form 10 data servers.

那麼當,客戶端A的待寫資料A2寫入成功的個數M>N時,可以向各寫入成功的資料伺服器發送OK消息,資料伺服器則可以根據該OK消息判斷是否將自身的狀態修改為可升級狀態。 Then, when the number of successfully written data A2 of client A to be written is M>N, an OK message can be sent to each successfully written data server, and the data server can determine whether to write its own data based on the OK message. The status is changed to an upgradeable status.

如此,可以透過一客戶端在M<N的情況下,再次向與上次相同的R個資料伺服器寫入待寫資料,以主動更新資料伺服器的狀態,可以降低資料伺服器處於不可升級狀態的時間。 In this way, it is possible to write data to be written to the same R data servers as the last time through a client under the condition of M<N, so as to actively update the status of the data server, which can reduce the data server from being unupgradable. The time of the state.

在本申請另一優選的實施例中,所述第一反饋資訊和第二反饋資訊包括客戶端標識。 In another preferred embodiment of the present application, the first feedback information and the second feedback information include a client identifier.

比如對於客戶端A,在向伺服器發送第一反饋資訊或第二反饋資訊時,該第一反饋資訊、第二反饋資訊中都包括客戶端標識“客戶端A”。 For example, for the client A, when sending the first feedback information or the second feedback information to the server, both the first feedback information and the second feedback information include the client identifier "Client A".

則所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態包括:所述第二反饋資訊供所述資料伺服器在接收到第二反饋資訊後,將第二反饋資訊中的客戶端標識寫入不可升級列表並標記自身的狀態為不可升級狀態;在本申請實施例中,在資料伺服器側設置了不可升級列表。以客戶端A為例,那麼在資料伺服器接收到客戶端A的第二反饋資訊後,則將其自身的狀態設置為不可升級狀態,並將該客戶端A寫入不可升級列表。 Then the first feedback information or the second feedback information for the data server to determine its own state includes: the second feedback information for the data server to send the second feedback information after receiving the second feedback information The client identifier in is written into the non-upgradeable list and marks its own status as the non-upgradeable state; in the embodiment of the present application, the non-upgradeable list is set on the side of the data server. Taking client A as an example, after receiving the second feedback information from client A, the data server sets its own state to a non-upgradeable state, and writes the client A into the non-upgradeable list.

所述第一反饋資訊供所述資料伺服器在接收到第一反饋資訊後,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 The first feedback information is used by the data server to delete the client identifier in the first feedback information from the unupgradeable list after receiving the first feedback information, and mark its own status after determining that the unupgradable list is empty It is in an upgradeable state.

在本申請實施例中,由於客戶端A在向各寫入成功的資料伺服器發送第二反饋資訊的步驟之後,出現新的待寫 資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象。那麼對於接收到客戶端A發送的第二反饋消息的資料伺服器,其後續還會接收該客戶端A發送的消息。那麼當資料伺服器繼續接收到客戶端A的消息為第一反饋消息,則可以從不可升級列表中刪除客戶端A的記錄。 In the embodiment of the present application, after the client A sends the second feedback information to each successfully written data server, new data to be written appears, so as to include a plurality of data servers written successfully before. Data server is the target. Then, for the data server that receives the second feedback message sent by the client A, it will subsequently receive the message sent by the client A. Then, when the data server continues to receive the message from the client A as the first feedback message, it can delete the record of the client A from the unupgradeable list.

當然,實際應用中,資料伺服器接收到某個客戶端的第一反饋消息,可能不可升級列表中沒有記錄相應客戶端標識,則不用執行刪除過程。 Of course, in actual applications, if the data server receives the first feedback message of a certain client, the corresponding client ID may not be recorded in the unupgradeable list, so there is no need to perform the deletion process.

然後,在資料伺服器確定不可升級列表為空時,將自身的狀態設置為可升級狀態。 Then, when the data server determines that the non-upgradeable list is empty, it sets its own status to the upgradeable status.

當然,在本申請實施例中,客戶端還可以接收資料伺服器發送的退出升級準備狀態的退出通知,並根據該退出通知退出升級準備狀態。然後客戶端則按照正常請求發送邏輯向資料伺服器發送寫入請求。 Of course, in the embodiment of the present application, the client can also receive the exit notification for exiting the upgrade preparation state sent by the data server, and exit the upgrade preparation state according to the exit notification. Then the client sends a write request to the data server according to the normal request sending logic.

在本申請實施例中,從客戶端側介紹了本申請的一種分布式儲存系統升級方法,讓各個客戶端對於同一個待寫資料,同時向多個資料伺服器發送該針對該待寫資料的寫入請求,然後分析在多少個資料伺服器中寫入成功,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。其中所述第一反饋資訊供所述資料伺服器在接收到第一反饋資訊後,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。。從而本申請實施例中,在升級控制伺 服器在以輪循的方式控制各資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險。 In the embodiment of this application, a distributed storage system upgrade method of this application is introduced from the client side, so that each client can simultaneously send the information for the data to be written to multiple data servers for the same data to be written. Write the request, and then analyze how many data servers have been successfully written, determine whether the number of successful writes is greater than the specified number, and send the first feedback information or the first feedback information to each successfully written data server based on the judgment result. 2. Feedback information. The first feedback information is for the data server to delete the client identifier in the first feedback information from the unupgradeable list after receiving the first feedback information, and mark its own after determining that the unupgradable list is empty The status is upgradeable. . Therefore, in the embodiment of the present application, when the upgrade control server controls each data server to upgrade in a round-robin manner, since the client controls the state of the data server, it is ensured that the data to be written by any client is written at least A designated number of data servers are used for backup. Therefore, without stopping the upper-layer services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data and greatly reduce the user data. Risk of loss.

實施例二 Example two

本申請實施例應用於分布式儲存伺服器的資料伺服器側。 The embodiments of this application are applied to the data server side of a distributed storage server.

參照圖2,示出了本申請的一種分布式儲存系統升級方法實施例的步驟流程圖,具體可以包括如下步驟:步驟210,接收客戶端發送的第一反饋資訊或者第二反饋資訊;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得。 Referring to FIG. 2, there is shown a step flow chart of an embodiment of a distributed storage system upgrade method of the present application, which may specifically include the following steps: step 210, receiving first feedback information or second feedback information sent by a client; The first feedback information or the second feedback information is obtained based on the comparison result of the number of successful writes and the specified number after the client sends write requests to multiple data servers for the same piece of data to be written.

結合實施例一客戶端側的描述,客戶端針對待寫資料A1,向R個資料伺服器發送寫入請求後,當寫入成功的個數M大於指定個數N,則會向該M個資料伺服器發送第一反饋消息;當M等於N,則會向該M個資料伺服器發送第二反饋消息。當M<N,則針對所述待寫資料A1向所述多個資料伺服器之外的至少一個資料伺服器發送寫入請求,然後接收所述至少一個資料伺服器回傳的響應,並結合已寫入成功的個數判斷當前全部的寫入成功的個數M 是否等於指定個數N,如果M=N,則向該M個資料伺服器發送第二反饋資訊。當然,對於客戶端回傳第一反饋資訊和第二反饋資訊的具體過程可以參照實施例一的描述,在此不再贅敘。 With reference to the description on the client side of the first embodiment, after the client sends a write request to R data servers for the data A1 to be written, when the number of successful writes M is greater than the specified number N, it will send a write request to the M data servers. The data server sends the first feedback message; when M is equal to N, the second feedback message is sent to the M data servers. When M<N, send a write request to at least one data server other than the multiple data servers for the data A1 to be written, and then receive a response from the at least one data server, and combine it The number of successful writes determines whether the current number of successful writes M is equal to the specified number N, and if M=N, the second feedback information is sent to the M data servers. Of course, the specific process for the client to return the first feedback information and the second feedback information can refer to the description of the first embodiment, which will not be repeated here.

相對的,對於分布式儲存系統的各個資料伺服器,其可能接收到各個客戶端回傳的第一反饋資訊,如OK消息。也可能接收到各個客戶端回傳的第二反饋消息,如HOLD消息。 In contrast, for each data server of the distributed storage system, it 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.

優選地,在步驟210之前,還包括:步驟201,接收由升級控制伺服器發送的第一升級通知。 Preferably, before step 210, the method further includes: step 201, receiving the first upgrade notification sent by the upgrade control server.

步驟202,根據所述第一升級通知進入升級準備狀態,並在接收到客戶端的存取請求後發送第二升級通知至所述客戶端,以使所述客戶端進入升級準備狀態。 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 client's access request, so that the client enters the upgrade preparation state.

在本申請實施例中分布式儲存系統的升級控制伺服器首先向各資料伺服器發送第一升級通知,相應的各資料伺服器則接收該第一升級通知,然後根據該第一升級通知進入升級準備狀態。 In the embodiment of the present application, the upgrade control server of the distributed storage system first sends a first upgrade notification to each data server, and each corresponding data server receives the first upgrade notification, and then enters the upgrade according to the first upgrade notification. Ready state.

然後,對於存取該進入升級準備狀態的資料伺服器,接收到某個客戶端的存取請求後,則回傳第二升級通知至該客戶端。該客戶端則根據該第二升級通知進入升級準備狀態。 Then, for accessing the data server that enters the upgrade preparation state, after receiving an access request from a certain client, it returns a second upgrade notification to the client. The client enters the upgrade preparation state according to the second upgrade notification.

當資料伺服器進入升級準備狀態,則可以進入本申請實施例的步驟210、220等由資料伺服器側執行的步驟。 When the data server enters the upgrade preparation state, it can enter steps 210 and 220 of the embodiment of the present application, which are executed by the data server side.

步驟220,在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;所述狀態包括可升級狀態和不可升級狀態。 Step 220, in the case where the self is not upgraded, determine the state of the data server itself according to the first feedback information or the second feedback information; the state includes an upgradeable state and an unupgradable state.

其中,所述狀態供升級控制伺服器以輪循的方式選擇通知所述資料伺服器進行升級操作。 Wherein, the status is for the upgrade control server to select and notify the data server to perform the upgrade operation in a round-robin manner.

在實際應用中,除了所有資料伺服器剛進入升級準備狀態,各個資料伺服器處於未升級的情況。而隨著某些資料伺服器不斷完成升級過程,這些資料伺服器則會處於已升級狀態,比如已成功升級的資料伺服器設置自身的狀態為DONE,此時,已成功升級的資料伺服器也會接收到第一反饋資訊或者第二反饋資訊,但是其不會再對第一反饋資訊或者第二反饋資訊進行處理,其狀態保持為已升級狀態。 In actual applications, except that all data servers have just entered the upgrade preparation state, each data server is in a state of not being upgraded. As some data servers continue to complete the upgrade process, these data servers will be in an upgraded state. For example, a data server that has been successfully upgraded sets its own status to DONE. At this time, the data server that has been successfully upgraded is also It will receive the first feedback information or the second feedback information, but it will no longer process the first feedback information or the second feedback information, and its status will remain upgraded.

而只有處於未升級狀態的資料伺服器才根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態。 Only the data server in the unupgraded state determines the state of the data server itself based on the first feedback information or the second feedback information.

可以理解,對於分布式集群中的各個未升級的資料服務來說,當其接收到第一反饋資訊或第二反饋資訊後,則可以根據第一反饋資訊或第二反饋資訊確定自身是處於可升級狀態還是處於不可升級狀態。其中可升級狀態比如OK,不可升級狀態比如HOLD。比如,如果某個資料伺服器收到了第二反饋資訊,則該資料伺服器則可將自身的狀態設置為不可升級狀態。如果某個資料伺服器收到的了第一反饋資訊,則可將自身的狀態設置為可升級狀態。 It can be understood that for each unupgraded data service in the distributed cluster, after it receives the first feedback information or the second feedback information, it can determine whether it is in a state of availability based on the first feedback information or the second feedback information. The upgrade state is still in a non-upgradeable state. Among them, the upgradeable state is such as OK, and the non-upgradable state is such as HOLD. For example, if a certain data server receives the second feedback information, the data server can set its own status to a non-upgradeable status. If a certain data server receives the first feedback information, it can set its own status to an upgradeable status.

在本申請另一優選的實施例中,第一反饋資訊和第二反饋資訊包括客戶端標識。 In another preferred embodiment of the present application, the first feedback information and the second feedback information include a client identifier.

那麼基於實施例一的步驟150,則優選地,步驟220,包括子步驟221-222:子步驟221,當接收到第二反饋資訊,則將所述第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態;在本申請實施例中,在各個資料服務中預先設置了不可升級列表,用於記錄發送了HOLD消息的客戶端標識等資訊。 Then based on step 150 of the first embodiment, preferably, step 220 includes sub-steps 221-222: sub-step 221, when the second feedback information is received, the client identifier in the second feedback information is written into Unupgradeable list, and mark its own status as unupgradable; in the embodiment of the present application, an unupgradable list is preset in each data service to record information such as the identification of the client that sent the HOLD message.

比如對於客戶端A,其對於待寫資料A1,向多個資料伺服器發送寫入請求,其中資料伺服器U1、U2、U3寫入成功,且M=N時,其會向相應的M個資料伺服器發送HOLD消息。該HODL消息包括了HOLD指令、客戶端標識。那麼這M個資料伺服器接收到HOLD消息,則在不可升級列表中記錄客戶端A。當然,還可以相應記錄當前時間。 For example, for client A, it sends write requests to multiple data servers for the data A1 to be written. When the data servers U1, U2, and U3 are successfully written, and M=N, it will send a write request to the corresponding M The data server sends a HOLD message. The HODL message includes the HOLD instruction and the client identification. Then the M data servers receive the HOLD message, and record the client A in the non-upgradeable list. Of course, you can also record the current time accordingly.

比如客戶端B對其待寫資料B1,向多個資料伺服器發送寫入請求,該多個資料伺服器中也包括了資料伺服器U1,且M=N。那麼資料伺服器U1的不可升級列表中還記錄客戶端B。當然也可記錄當前時間。 For example, the client B sends a write request to multiple data servers for the data B1 to be written, and the multiple data servers also include the data server U1, and M=N. Then the client B is also recorded in the unupgradable list of the data server U1. Of course, the current time can also be recorded.

資料伺服器U1的不可升級列表記錄示例如表一:

Figure 106102727-A0202-12-0024-1
An example of the non-upgradable list record of the data server U1 is shown in Table 1:
Figure 106102727-A0202-12-0024-1

當然,對於同一客戶端再次發送的HOLD消息,則不可升級列表中可以只記錄一條該對應該客戶端的客戶端標識,也可以記錄多條對應客戶端的客戶端標識。在實際應用中,優選的,對於同一客戶端多吃發送的HOLD消息,可以只記錄一條客戶端標識,然後在時間字節,記錄各次的時間。 Of course, for the HOLD message sent again by the same client, only one client ID corresponding to the client may be recorded in the unupgradeable list, or multiple client IDs corresponding to the client may be recorded. In practical applications, preferably, for the HOLD message sent by the same client, only one client ID can be recorded, and then the time of each time is recorded in the time byte.

在接收到HOLD消息後,還將資料伺服器自身的狀態修改為HOLD狀態,表示該資料服務不可升級。 After receiving the HOLD message, the state of the data server itself is modified to the HOLD state, indicating that the data service cannot be upgraded.

優選地,在子步驟221之後,還包括子步驟B21:子步驟B21,對於不可升級列表中的客戶端標識,判斷是否在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,如果未在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,則將所述客戶端標識從不可升級列表中刪除。 Preferably, after sub-step 221, it further includes sub-step B21: sub-step B21, for the client identifiers in the non-upgradeable list, it is determined whether the second feedback message of the corresponding client is not received within a specified number of time periods, If the second feedback message of the corresponding client is not received within a specified number of time periods, the client identifier is deleted from the non-upgradeable list.

本申請實施例可以預先設置一個時間週期T1,對於不可升級列表中的客戶端標識所對應的客戶端,如果資料伺服器在指定未接收到該客戶端再次發送的HOLD消息,則將不可升級列表中該客戶端標識記錄刪除。 In this embodiment of the application, a time period T1 may be preset. For the client corresponding to the client identifier in the non-upgradeable list, if the data server does not receive the HOLD message sent by the client again, the non-upgradeable list will be removed. The client ID record is deleted.

比如前述資料伺服器U1的表一,如果在3*T1的時間內,未接收到客戶端A的HOLD消息,則將表一中客戶端A的記錄刪除。 For example, in Table 1 of the aforementioned data server U1, if the HOLD message of Client A is not received within 3*T1, the record of Client A in Table 1 will be deleted.

該步驟可以避免資料伺服器處於不可升級狀態之後,一直處於不可升級狀態。 This step can prevent the data server from being in the non-upgradable state after being in the non-upgradable state.

子步驟222,接收到第一反饋資訊,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 In sub-step 222, the first feedback information is received, the client identifier in the first feedback information is deleted from the non-upgradeable list, and the status of itself is marked as an upgradable state after it is determined that the non-upgradeable list is empty.

比如前述資料伺服器U1,其接受到客戶端A再次發送的OK消息,則從表一中將客戶端A的記錄刪除。當資料伺服器將表一的所有記錄都刪除後,表一為空時,則將自身的狀態設置為可升級狀態,在本申請另一優選的實施例中,子步驟222,包括子步驟B11-B14:子步驟B11,判斷所述不可升級列表是否有所述第一反饋資訊中的客戶端標識;如果所述不可升級列表有所述第一反饋資訊中的客戶端標識,則進入子步驟B12。 For example, the aforementioned data server U1, which receives the OK message sent by the client A again, deletes the record of the client A from Table 1. When the data server deletes all the records in Table 1 and Table 1 is empty, it sets its own state to an upgradeable state. In another preferred embodiment of the present application, sub-step 222 includes sub-step B11 -B14: Sub-step B11, judging whether the non-upgradeable list has the client identifier in the first feedback information; if the non-upgradeable list has the client identifier in the first feedback information, enter the sub-step B12.

子步驟B12,將所述客戶端標識從不可升級列表中刪除。 In sub-step B12, the client identifier is deleted from the unupgradeable list.

由於一個資料伺服器可能被分配給不同的客戶端使用,因此,可能接收到不同客戶端的第一反饋資訊,那麼對於接收到的某個客戶端的第一反饋資訊,則判斷所述不可升級列表是否有所述第一反饋資訊的客戶端標識,所述不可升級列表有所述第一反饋資訊的客戶端標識,則將所 述客戶端標識從不可升級列表中刪除;所述不可升級列表沒有所述第一反饋資訊的客戶端標識,則可以不進行後續操作。 Since a data server may be allocated to different clients, it may receive the first feedback information of different clients. Then, for the received first feedback information of a certain client, it is determined whether the non-upgradeable list is If there is an identifier of the client with the first feedback information, and the unupgradeable list has an identifier of the client with the first feedback information, the client identifier is deleted from the unupgradable list; the unupgradable list has nothing If the client identification of the first feedback information is mentioned, subsequent operations may not be performed.

比如對於前述資料伺服器U1,如果接收到客戶端A再次發送的ok消息,該ok消息中包括客戶端標識,則可以利用客戶端標識與表一的客戶端標識進行匹配,發現存在客戶端A,則清除客戶端A的記錄。如果接收到客戶端C發送的Ok消息,發現表一中沒有記錄,則不進行任何操作。 For example, for the aforementioned data server U1, if it receives the ok message sent by client A again, and the ok message includes the client ID, the client ID can be used to match the client ID in Table 1, and it is found that there is client A , Then the record of client A is cleared. If the Ok message sent by client C is received, and no record is found in Table 1, no operation is performed.

上述步驟方便資料伺服器對自身的升級狀態進行管理,邏輯簡單。 The above steps are convenient for the data server to manage its own upgrade status, and the logic is simple.

子步驟B13,判斷不可升級列表是否為空;如果所述不可升級列表為空時,則進入子步驟B14。如果所述不可升級列表不為空,則保持自身的狀態為不可升級狀態。 Sub-step B13, judge whether the non-upgradeable list is empty; if the non-upgradeable list is empty, then proceed to sub-step B14. If the non-upgradeable list is not empty, keep its own state as the non-upgradeable state.

子步驟B14,標記自身的狀態為可升級狀態。 Sub-step B14, mark its own state as an upgradeable state.

如果所述不可升級列表不為空時,則保持自身的不可升級狀態。 If the non-upgradeable list is not empty, keep its own non-upgradeable state.

如前述例子,對於資料伺服器U1,先接收到客戶端A發送的OK消息,清除了客戶端A的記錄,判斷表一還是不為空,則繼續保持HOLD狀態。如果再接收到客戶端B的OK消息,則在子步驟221中將表一中的客戶端B的記錄刪除,此時判斷表一為空,則資料伺服器U1修改自身的HODL狀態為OK狀態,表示資料伺服器U1可以升 級。 As in the foregoing example, for the data server U1, it first receives the OK message sent by the client A, clears the record of the client A, and determines that the table 1 is still not empty, and continues to maintain the HOLD state. If an OK message from client B is received again, the record of client B in Table 1 is deleted in sub-step 221. At this time, it is judged that Table 1 is empty, and the data server U1 modifies its HODL status to OK. , Which means that the data server U1 can be upgraded.

然後,升級控制伺服器可以根據各資料伺服器的狀態以輪循的方式選擇通知所述資料伺服器進行升級操作。當然升級控制伺服器具體控制各資料服務升級的過程可以參照實施例三的描述。 Then, the upgrade control server can select and notify the data server to perform the upgrade operation in a round-robin manner according to the status of each data server. Of course, for the specific process of the upgrade control server controlling the upgrade of each data service, reference may be made to the description in the third embodiment.

當然,在本申請實施例中,資料伺服器還可以升級控制伺服器發送的退出升級準備狀態的退出通知,並根據該退出通知退出升級準備狀態,同時根據該退出通知向客戶端發送退出通知,使客戶端退出升級準備狀態。然後資料伺服器則按照正常處理邏輯對客戶端的寫入請求進行處理。 Of course, in this embodiment of the application, the data server may also upgrade the exit notification sent by the control server to exit the upgrade preparation state, and exit the upgrade preparation state according to the exit notification, and at the same time send an exit notification to the client according to the exit notification, Make the client exit the upgrade preparation state. Then the data server processes the write request of the client according to the normal processing logic.

在本申請實施例中,從資料伺服器側介紹了本申請的一種分布式儲存系統升級方法,對於資料伺服器,根據接收到的客戶端發送的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還是處於不可升級狀態。其中所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;所述狀態包括可升級狀態和不可升級狀態;所述狀態供升級控制伺服器以輪循的方式選擇通知所述資料伺服器進行升級操作。從而是由客戶端控制資料伺服器的狀態,保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,在升級控制伺服器以輪循的方式控制各資料伺服器進行升級時,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統 對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險。 In the embodiment of this application, a distributed storage system upgrade method of this application is introduced from the data server side. For the data server, it determines itself according to the received first feedback information or second feedback information sent by the client Whether it is in an upgradeable state or a non-upgradable state. The first feedback information or the second feedback information is obtained based on the comparison result of the number of successful writes and the specified number after the client sends write requests to multiple data servers for the same piece of data to be written; The status includes an upgradeable status and an unupgradable status; the status is for the upgrade control server to select and notify the data server to perform the upgrade operation in a round-robin manner. Therefore, the client controls the status of the data server to ensure that the data to be written by any client is written to a specified number of data servers for backup. The upgrade control server controls each data server in a round-robin manner. During the upgrade, without stopping the upper-level services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data, and greatly reduce the risk of user data loss.

實施例三 Example three

參照圖3,示出了本申請的一種分布式儲存系統升級方法實施例的步驟流程圖,具體可以包括如下步驟:步驟310,獲取各資料伺服器的狀態;所述狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;所述資料伺服器的狀態根據所述第一反饋資訊或者第二反饋資訊確定;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得。 3, there is shown a step flow chart of an embodiment of a method for upgrading a distributed storage system of the present application, which may specifically include the following steps: Step 310: Obtain the status of each data server; the status includes an upgradeable status and an unavailable status. Upgrade status, each data server has a status; the status 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 based on the same copy of the client After the data to be written sends write requests to multiple data servers, the comparison result of the number of successfully written data and the specified number is obtained.

結合實施例一和實施例二的描述,分布式儲存系統中各個資料伺服器可以根據客戶端反饋的第一反饋消息及/或第二反饋消息,確定其狀態,該狀態包括可升級狀態和不可升級狀態。 Combining the description of the first and second embodiments, each data server in the distributed storage system can determine its status according to the first feedback message and/or the second feedback message fed back by the client. The status includes an upgradeable status and an unavailable status. Upgrade status.

由於每個資料伺服器同時只能有一個狀態。比如某個資料伺服器如果處於可升級狀態,則其不可能有其他狀態。其他情況類似,在此不再贅敘。 Because 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, so I won't repeat them here.

那麼,本申請實施例的升級控制伺服器則可以獲取各個資料服務的狀態。 Then, the upgrade control server of the embodiment of the present application can obtain the status of each data service.

升級控制伺服器獲取資料服務的狀態的具體獲取方式可以有多種,本申請實施例不對其加以限制。 There may be many specific ways for the upgrade control server to obtain the status of the data service, which is not limited in the embodiment of the present application.

步驟320,以輪循的方式通知至少一個處於可升級狀 態的資料伺服器進行升級操作;所述資料伺服器根據所述通知進行升級操作。 Step 320: Notify at least one data server in an upgradeable state to perform the upgrade operation in a round-robin manner; the data server performs the upgrade operation according to the notification.

在本申請實施例中,由於各個資料伺服器根據客戶端的反饋資訊設定了自身狀態,那麼升級控制伺服器可以採用輪循的方式控制處於可升級狀態的資料伺服器進行升級操作。 In the embodiment of the present application, since each data server sets its own state according to the feedback information of the client, the upgrade control server can control the data server in the upgradeable state to perform the upgrade operation in a round-robin manner.

比如,每次選擇一批可升級的資料伺服器,通知這批資料伺服器進行升級操作。該批資料伺服器收到升級通知後,則可以重啟升級。 For example, each time a batch of data servers that can be upgraded is selected, these data servers are notified to perform an upgrade operation. After the batch of data servers receive the upgrade notification, they can restart the upgrade.

在本申請另一優選的實施例中,步驟320包括子步驟321-322:子步驟321,每次選擇至少一個處於可升級狀態的資料伺服器,通知所述至少一個處於可升級狀態的資料伺服器執行升級操作;比如處於可升級狀態的資料伺服器有U1、U2、U3,U10、U11、......U20等,則升級控制伺服器每次可以從中選擇K個資料伺服器,通知其進行升級操作,比如選擇3個。其中K為大於0的整數。當然,K可以根據實際需求設置,本申請不對其加以限制。 In another preferred embodiment of the present application, step 320 includes sub-steps 321-322: sub-step 321, each time at least one data server in an upgradeable state is selected, and the at least one data server in an upgradeable state is notified For example, the data servers in the upgradeable state are U1, U2, U3, U10, U11, ... U20, etc., and the upgrade control server can select K data servers from them each time. Notify it to perform the upgrade operation, for example, select three. Where K is an integer greater than zero. Of course, K can be set according to actual needs, and this application does not limit it.

子步驟322,監控所述至少一個處於可升級狀態的資料伺服器是否全部執行完升級操作;如果所述至少一個處於可升級狀態的資料伺服器全部執行完升級操作,則進入子步驟321;比如升級控制伺服器通知了前述資料伺服器U1、 U2、U3進行升級操作,那麼資料伺服器U1、U2、U3則重啟升級。當資料伺服器升級成功之後,則可以修改自身的狀態為已升級狀態,比如DONE。 Sub-step 322, monitor whether the at least one data server in the upgradeable state has all performed the upgrade operation; if the at least one data server in the upgradeable state has all performed the upgrade operation, enter the sub-step 321; for example, The upgrade control server notifies the aforementioned data servers U1, U2, U3 to perform the upgrade operation, and then the data servers U1, U2, U3 restart the upgrade. After the data server is successfully upgraded, you can modify its own status to an upgraded status, such as DONE.

那麼升級控制伺服器則可以監控這些資料伺服器的狀態是否為DONE,如果未DONE,則升級成功。 Then the upgrade control server can monitor whether the status of these data servers is DONE, and if it is not DONE, the upgrade is successful.

當然,實際應用中,可能該批資料伺服器升級過程中,某個或者某幾個可能升級失敗,升級控制伺服器則監控該資料伺服器升級成功或者失敗。在實際應用中,升級失敗可以透過如機器重啟失敗,重啟後系統版本未變更等情況確定。 Of course, in actual applications, it is possible that during the upgrade of the batch of data servers, one or several of them may fail to upgrade, and the upgrade control server monitors the success or failure of the data server upgrade. In practical applications, the upgrade failure can be determined by the failure of the machine to restart, and the system version has not changed after the restart.

需要說明的是,上述執行完升級操作包括升級成功和升級失敗。全部執行完升級操作包括:所有資料伺服器全部升級成功;如果部分資料伺服器升級成功,則剩餘的資料伺服器升級失敗。 It should be noted that the above-mentioned completed upgrade operations include upgrade success and upgrade failure. After all the upgrade operations are completed, all the data servers are successfully upgraded; if part of the data servers are successfully upgraded, the remaining data servers will fail to upgrade.

如果U1、U2、U3的狀態全部為DONE,則進入下一次選擇至少一個處於可升級狀態的資料伺服器,通知所述至少一個處於可升級狀態的資料伺服器執行升級操作的步驟。 If the states of U1, U2, and U3 are all DONE, the next step is to select at least one data server in an upgradeable state, and notify the at least one data server in an upgradeable state to perform the upgrade operation.

當升級控制伺服器監控到其通知升級的資料伺服器全部執行完升級操作,則可以從處於可升級狀態的資料伺服器中輪循選擇下一批升級的資料伺服器。 When the upgrade control server monitors that all the data servers notified of the upgrade have completed the upgrade operation, it can select the next batch of upgraded data servers from among the data servers that are in an upgradeable state.

如此,可以避免輪循的頻率過快,降低資料丟失的風險。 In this way, the frequency of the round robin can be avoided too fast, and the risk of data loss can be reduced.

在本申請另一優選的實施例中,在資料伺服器執行升 級操作後,還包括:子步驟323,如果監控到任一資料伺服器的升級操作的結果為升級失敗,則將所述資料伺服器加入升級黑名單,暫停對該資料伺服器的升級。 In another preferred embodiment of the present application, after the data server performs the upgrade operation, the method further includes: sub-step 323, if the upgrade operation of any data server is monitored as a result of the upgrade failure, then the data server The server is added to the upgrade blacklist, and the upgrade of the data server is suspended.

如果某個資料伺服器升級失敗,則升級控制伺服器將該資料伺服器加入升級黑名單,暫停對該資料伺服器的升級。使這些資料伺服器等待下線或者人工修復。 If the upgrade of a certain data server fails, the upgrade control server adds the data server to the upgrade blacklist and suspends the upgrade of the data server. Make these data servers wait to be offline or manually repaired.

優選的,本申請實施例的多個資料伺服器可分佈於至少兩個機架上,當然實際應用中,分布式儲存系統的各個資料伺服器分佈在多個機架上,一個機架為一個資料伺服器子集群。 Preferably, the multiple data servers of the embodiment of the present application can be distributed on at least two racks. Of course, in practical applications, each data server of the distributed storage system is distributed on multiple racks, one rack for one rack. Data server sub-cluster.

進一步的,則步驟320,包括子步驟C11:子步驟C11,每次選擇處於可升級狀態的資料伺服器最多的機架,通知所述機架中的資料伺服器進行升級操作;所述機架中的各資料伺服器根據所述通知檢查自身的狀態,如果處於可升級狀態,則重啟升級,如果處於不可升級狀態或者升級完畢狀態,則拒絕重啟升級。 Further, step 320 includes sub-step C11: sub-step C11, each time the rack with the most data servers in the upgradeable state is selected, the data servers in the rack are notified to perform the upgrade operation; the rack Each data server in the data server checks its own state according to the notification, and if it is in the upgradeable state, restarts the upgrade, and if it is in the unupgradable state or the upgrade completed state, refuses to restart the upgrade.

在本申請實施例中,由於資料伺服器以機架的形式放置,一個機架放置了一批資料伺服器。而對於大量的客戶端來說,其可能存取不同機架的不同的資料伺服器,從而使各個機架都可能存在可升級狀態的資料伺服器,也可能存在不可升級狀態的資料伺服器,也可能存在升級完畢的資料伺服器。 In the embodiment of the present application, since the data servers are placed in the form of racks, a batch of data servers are placed in one rack. For a large number of clients, they may access different data servers in different racks, so that each rack may have data servers in an upgradeable state, or there may be data servers in an unupgradable state. There may also be data servers that have been upgraded.

而為了方便升級控制伺服器發送升級的通知,本申請 實施例以機架為單位發送升級通知,比如一機架的IP段為200.200.200.***,本申請實施例的升級控制伺服器至需要生成一條針對200.200.200.***的通知,廣播到該機架中,該機架的各個資料伺服器即可接收到該通知。 In order to facilitate the upgrade control server to send the upgrade notification, the embodiment of the application sends the upgrade notification in units of racks. For example, the IP segment of a rack is 200.200.200.***, and the upgrade control server in this embodiment of the application A notification for 200.200.200.*** needs to be generated and broadcast to the rack, and each data server of the rack can receive the notification.

那麼對於該機架中的資料伺服器,接收到上述升級的通知後,則先判斷自身的狀態是否為OK,如果是OK,則重啟升級;如果不是OK,而是HOLD或者DONE,則拒絕重啟升級。 Then for the data server in the rack, after receiving the above upgrade notification, it will first determine whether its status is OK, if it is OK, restart the upgrade; if it is not OK, but HOLD or DONE, refuse to restart upgrade.

本申請實施例中,為了更快的完成升級,則選擇狀態為OK的資料伺服器最多的機架,向該機架發送升級的通知。 In the embodiment of the present application, in order to complete the upgrade faster, the rack with the most data servers with the status OK is selected, and the upgrade notification is sent to the rack.

比如處於可升級狀態的資料伺服器有U1、U2、U3,U10、U11、......U20等,則每次可以從中選擇K個資料伺服器,通知其進行升級操作,比如選擇3個。 For example, the data servers in the upgradeable state are U1, U2, U3, U10, U11, ... U20, etc., each time you can select K data servers from them, and notify them to perform the upgrade operation, for example, select 3. indivual.

優選地,在子步驟C11之後,還包括子步驟C12:子步驟C12,監控所述機架中的資料伺服器是否全部執行完升級操作;如果所述機架中的資料伺服器全部執行完升級操作,則進入子步驟C11。 Preferably, after sub-step C11, it further includes sub-step C12: sub-step C12, monitoring whether all the data servers in the rack have completed the upgrade operation; if all the data servers in the rack have completed the upgrade Operation, then enter the sub-step C11.

那麼,當監控到該機架中處於可升級狀態的資料伺服器的升級操作全部執行完畢之後,則可以選擇下一個機架,向下一個機架的資料伺服器發送升級的通知。如此循環,直到所有的資料伺服器升級完畢。 Then, when it is monitored that all the upgrade operations of the data servers in the upgradeable state in the rack are completed, the next rack can be selected and the data server of the next rack can be notified of the upgrade. This cycle continues until all data servers have been upgraded.

透過上述過程,當升級控制伺服器監控到除了升級失敗的資料伺服器之外,所有資料伺服器升級完畢之後,則 可以通知各個資料伺服器退出升級準備狀態,回傳正常的處理邏輯,各個資料伺服器則通知存取該資料伺服器的客戶端退出升級準備狀態,客戶端回傳正常的處理邏輯,不再執行步驟310、320。 Through the above process, when the upgrade control server monitors that all data servers except the data servers that have failed to upgrade have been upgraded, it can notify each data server to exit the upgrade preparation state, and return the normal processing logic for each data. The server notifies the client accessing the data server to exit the upgrade preparation state, and the client sends back normal processing logic, and steps 310 and 320 are no longer executed.

在本申請實施例中,從升級控制伺服器側介紹了本申請的一種分布式儲存系統升級方法,升級控制伺服器在以輪循的方式控制可升級狀態的資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險;並且可容忍升級過程中非預期的機器異常,保證服務不受影響。再者升級時間快,避免大量的資料遷移。 In the embodiment of this application, a distributed storage system upgrade method of this application is introduced from the side of the upgrade control server. When the upgrade control server controls the upgradeable data server in a round-robin manner to upgrade, because The client controls the status of the data server, and ensures that the data to be written by any client is written to the specified number of data servers for backup at least. Therefore, the distributed storage system can be guaranteed without stopping the upper-layer services. The response time to the client is low, which also improves the reliability of the data and greatly reduces the risk of user data loss; and can tolerate unexpected machine abnormalities during the upgrade process to ensure that the service is not affected. Furthermore, the upgrade time is fast, avoiding a large amount of data migration.

實施例四 Example four

參照圖4,示出了本申請的一種分布式儲存系統升級方法實施例的步驟流程圖,具體可以包括如下步驟:步驟410,由客戶端對同一份待寫資料,向多個資料伺服器發送寫入請求。 4, there is shown a step flow chart of an embodiment of a method for upgrading a distributed storage system of the present application, which may specifically include the following steps: Step 410, the client sends the same piece of data to be written to multiple data servers Write request.

步驟412,由客戶端接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數;如果寫入成功的個數大於指定個數,則進入步驟414;如果寫入成功的個數不大於指定個數,則進入步驟416。 Step 412, the client receives the response from each data server, and judges whether the number of successful writes is greater than the specified number according to the response; if the number of successful writes is greater than the specified number, go to step 414 ; If the number of successful writes is not greater than the specified number, go to step 416.

步驟414,由客戶端向各寫入成功的資料伺服器發送第一反饋資訊。 Step 414: The client sends the first feedback information to each data server that has been successfully written.

步驟416,由客戶端向各寫入成功的資料伺服器發送第二反饋資訊;在本申請另一優選的實施例中,所述第一反饋資訊和第二反饋資訊包括客戶端標識。在向各寫入成功的資料伺服器發送第二反饋資訊的步驟之後,還包括:步驟417,當出現新的待寫資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象,進入對同一份待寫資料,向多個資料伺服器發送寫入請求的步驟。 Step 416, the client sends second feedback information to each data server that has successfully written; in another preferred embodiment of the present application, the first feedback information and the second feedback information include a client identifier. After the step of sending the second feedback information to each successfully written data server, the method further includes: step 417, when new data to be written appears, take multiple data servers including the previously written data server as The subject enters the step of sending write requests to multiple data servers for the same piece of data to be written.

步驟418,由資料伺服器接收客戶端發送的第一反饋資訊或者第二反饋資訊;步驟420,由資料伺服器在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;所述狀態包括可升級狀態和不可升級狀態;優選的在步驟417的基礎上,所述步驟420包括子步驟D11-D16:子步驟D11,當接收到第二反饋資訊,則將所述第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態;子步驟D12,對於不可升級列表中的客戶端標識,判斷是否在指定個數的時間週期內未接收到相應客戶端的第二反饋消息;如果未在指定個數的時間週期內未接收到相 應客戶端的第二反饋消息,則進入子步驟D13。如果在在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,則維持不可升級狀態。 In step 418, the data server receives the first feedback information or the second feedback information sent by the client; in step 420, the data server uses the first feedback information or the second feedback information when it is not upgraded. , Determine the status of the data server itself; the status includes the upgradeable status and the non-upgradable status; preferably on the basis of step 417, the step 420 includes sub-steps D11-D16: sub-step D11, when the second Feedback information, write the client identifier in the second feedback information into the non-upgradeable list, and mark its own status as non-upgradeable; sub-step D12, for the client identifier in the non-upgradeable list, determine whether it is in the designated The second feedback message of the corresponding client is not received within a number of time periods; if the second feedback message of the corresponding client is not received within the specified number of time periods, then the sub-step D13 is entered. If the second feedback message of the corresponding client is not received within a specified number of time periods, the upgradeable state is maintained.

子步驟D13,將所述客戶端標識從不可升級列表中刪除。進入子步驟D15。 In sub-step D13, the client identifier is deleted from the unupgradeable list. Proceed to sub-step D15.

子步驟D14,判斷所述不可升級列表是否有所述第一反饋資訊中的客戶端標識;如果所述不可升級列表有所述第一反饋資訊中的客戶端標識,則進入子步驟D13。如果所述不可升級列表沒有所述第一反饋資訊中的客戶端標識,則進入子步驟D15子步驟D15,判斷不可升級列表是否為空;如果所述不可升級列表為空時,則進入子步驟D16。 Sub-step D14, judging whether the non-upgradeable list has the client identifier in the first feedback information; if the non-upgradeable list has the client identifier in the first feedback information, proceed to sub-step D13. If the non-upgradeable list does not have the client identifier in the first feedback information, enter sub-step D15 and sub-step D15 to determine whether the non-upgradeable list is empty; if the non-upgradeable list is empty, then enter the sub-step D16.

子步驟D16,標記自身的狀態為可升級狀態。 Sub-step D16, mark its own state as an upgradeable state.

步驟422,由升級控制伺服器獲取各資料伺服器的狀態;步驟424,由升級控制伺服器以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;步驟426,由資料伺服器根據所述通知進行升級操作。 Step 422, the upgrade control server obtains the status of each data server; step 424, the upgrade control server informs at least one data server in an upgradeable state to perform the upgrade operation in a round-robin manner; step 426, the data server The device performs the upgrade operation according to the notification.

當然本發明實施例的客戶端側的步驟的原理可以參照實施例一的描述、資料伺服器側的步驟的原理可以參照實施例二的描述,升級控制伺服器側的步驟的原理可以參照實施例三的描述。在此不再贅敘。 Of course, the principle of the steps on the client side in the embodiment of the present invention can refer to the description of the first embodiment, the principle of the steps on the data server side can refer to the description of the second embodiment, and the principle of the steps on the upgrade control server side can refer to the embodiment. Three descriptions. I won't repeat it here.

在本申請實施例中,從客戶端、資料伺服器和升級控 制伺服器三個方面介紹了本申請的一種分布式儲存系統升級方法。對於存取該分布式儲存系統的客戶端,讓各個客戶端對於同一個待寫資料的寫入請求,同時向多個資料伺服器發送該寫入請求,然後分析在多少個資料伺服器中寫入成功,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。對於資料伺服器,根據接收到的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還是處於不可升級狀態。對於升級控制伺服器,則可以輪循控制處於可升級狀態的資料伺服器進行升級操作。透過上述過程,在升級控制伺服器在以輪循的方式控制可升級狀態的資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險;並且可容忍升級過程中非預期的機器異常,保證服務不受影響。 In the embodiment of this application, a method for upgrading a distributed storage system of this application is introduced from three aspects: the client, the data server, and the upgrade control server. For clients accessing the distributed storage system, let each client send the write request to multiple data servers at the same time for the same write request of the data to be written, and then analyze how many data servers are written If the input is successful, it is determined whether the number of successful writes is greater than the specified number, and the first feedback information or the second feedback information is sent to each successfully written data server according to the determination result. For the data server, according to the received first feedback information or second feedback information, it is determined whether it is in an upgradeable state or a non-upgradable state. For the upgrade control server, the data server in the upgradeable state can be controlled in a round-robin state to perform the upgrade operation. Through the above process, when the upgrade control server controls the data server in an upgradeable state in a round-robin manner to upgrade, the client controls the state of the data server and ensures that the data to be written by any client is at least written A designated number of data servers are used for backup. Therefore, without stopping the upper-level services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data and greatly reduce the user data. The risk of loss; and can tolerate unexpected machine abnormalities during the upgrade process to ensure that the service is not affected.

實施例五 Example five

參照圖5,示出了本申請的一種分布式儲存系統升級裝置實施例的結構方塊圖,具體可以包括如下模組:請求發送模組510,用於對同一份待寫資料,向多個資料伺服器發送寫入請求。 5, there is shown a structural block diagram of an embodiment of a distributed storage system upgrade device of the present application, which may specifically include the following modules: a request sending module 510, which is used to send multiple data to the same piece of data to be written The server sends a write request.

在本申請另一優選的實施例中,在步驟510之前,還包括:第二升級通知接收模組,用於在存取一資料伺服器時,接收由資料伺服器發送的第二升級通知。 In another preferred embodiment of the present application, before step 510, the method further includes: a second upgrade notification receiving module, configured to receive a second upgrade notification sent by the data server when accessing a data server.

第二升級準備模組,用於根據所述第二升級通知進入升級準備狀態。 The second upgrade preparation module is used to enter the upgrade preparation state according to the second upgrade notification.

判斷模組520,用於接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數。 The judging module 520 is configured to receive the response returned by each data server, and determine whether the number of successful writes is greater than the specified number according to the response.

第一反饋模組530,用於如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊。 The first feedback module 530 is configured to send the first feedback information to each data server that successfully writes if the number of successful writes is greater than the specified number.

第二反饋模組540,用於如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;其中,所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述資料伺服器的狀態供升級控制伺服器以輪循的方式通知所述資料伺服器進行升級操作。 The second feedback module 540 is configured to send second feedback information to each data server that has been successfully written if the number of successful writes is not greater than the specified number; wherein, the first feedback information or the second feedback Information for the data server to determine its own status; the status includes an upgradeable status and an unupgradable status; the status of the data server is for the upgrade control server to notify the data server to perform upgrade operations in a round-robin manner .

在本申請另一優選的實施例中,第二反饋模組540,包括:第二反饋資訊發送子模組,用於如果所述寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊。 In another preferred embodiment of the present application, the second feedback module 540 includes: a second feedback information sending sub-module, configured to write to each of the The successful data server sends the second feedback message.

寫入請求發送子模組,用於如果所述寫入成功的小於指定個數,則針對所述待寫資料向所述多個資料伺服 器之外的至少一個資料伺服器發送寫入請求。 The write request sending submodule is configured to send a write request to at least one data server other than the plurality of data servers for the data to be written if the number of successful writes is less than a specified number.

判斷子模組,用於接收所述至少一個資料伺服器回傳的響應,並結合已寫入成功的個數判斷當前寫入成功的個數是否等於指定個數;如果當前寫入成功的個數等於指定個數,則進入第二反饋資訊發送子模組。 The judging sub-module is used to receive the response returned by the at least one data server, and to determine whether the current successfully written number is equal to the specified number based on the number of successfully written data; if the current successfully written number is equal to the specified number If the number is equal to the specified number, enter the second feedback information sending sub-module.

在本申請另一優選的實施例中,在第二反饋資訊發送子模組之後,還包括:新待寫資料發送子模組,用於當出現新的待寫資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象,進入請求發送模組。 In another preferred embodiment of the present application, after the second feedback information sending sub-module, it further includes: a new to-be-written data sending sub-module, which is used when new data to be written appears, including the previous successful writing Enter the request sending module for multiple data servers of the data server.

在本申請另一優選的實施例中,所述第一反饋資訊和第二反饋資訊包括客戶端標識,則所述第一反饋資訊或第二反饋資訊供所述資料伺服器確定自身的狀態包括:所述第二反饋資訊供所述資料伺服器在接收到第二反饋資訊後,將第二反饋資訊中的客戶端標識寫入不可升級列表並標記自身的狀態為不可升級狀態;所述第一反饋資訊供所述資料伺服器在接收到第一反饋資訊後,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 In another preferred embodiment of the present application, the first feedback information and the second feedback information include a client identifier, and the first feedback information or the second feedback information for the data server to determine its own state includes : The second feedback information is for the data server to write the client identifier in the second feedback information into the non-upgradeable list and mark its own status as the non-upgradeable state after receiving the second feedback information; A feedback message for the data server to delete the client identifier in the first feedback message from the unupgradeable list after receiving the first feedback message, and mark its status as upgradeable after determining that the unupgradable list is empty state.

實施例六 Example Six

參照圖6,示出了本申請的一種分布式儲存系統升級裝置實施例的結構方塊圖,具體可以包括如下模組: 反饋資訊接收模組610,用於接收客戶端發送的第一反饋資訊或者第二反饋資訊;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得。 Referring to FIG. 6, there is shown a structural block diagram of an embodiment of a distributed storage system upgrade apparatus of the present application, which may specifically include the following modules: A feedback information receiving module 610 is used to receive the first feedback information sent by the client or The second feedback information; the first feedback information or the second feedback information is based on the comparison result of the number of successful writes and the specified number after the client sends write requests to multiple data servers for the same piece of data to be written get.

在本申請另一優選的實施例中,在反饋資訊接收模組610之前,還包括:第一升級通知接收模組,用於接收由升級控制伺服器發送的第一升級通知。 In another preferred embodiment of the present application, before the feedback information receiving module 610, it further includes: a first upgrade notification receiving module, configured to receive the first upgrade notification sent by the upgrade control server.

第一升級準備模組,用於根據所述第一升級通知進入升級準備狀態,並在接收到客戶端的存取請求後發送第二升級通知至所述客戶端,以使所述客戶端進入升級準備狀態。 The first upgrade preparation module is configured to enter the upgrade preparation state according to the first upgrade notification, and send a second upgrade notification to the client after receiving the client's access request, so that the client enters the upgrade Ready state.

狀態確定模組620,用於在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;所述狀態包括可升級狀態和不可升級狀態;所述狀態供升級控制伺服器以輪循的方式選擇通知所述資料伺服器進行升級操作。 The status determination module 620 is configured to determine the status of the data server itself based on the first feedback information or the second feedback information when the status determination module 620 is not upgraded; the status includes an upgradeable status and an unupgradable status; The status allows the upgrade control server to select and notify the data server to perform the upgrade operation in a round-robin manner.

在本申請另一優選的實施例中,狀態確定模組620,包括:可升級狀態確定子模組,用於當接收到第一反饋資訊,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 In another preferred embodiment of the present application, the status determination module 620 includes: an upgradeable status determination sub-module for deleting the customer in the first feedback information from the unupgradable list when the first feedback information is received Terminal identification, and after determining that the non-upgradable list is empty, mark its own state as an upgradable state.

優選地,可升級狀態確定子模組,包括:客戶端標識判斷子模組,用於判斷所述不可升級列表是否有所述第一反饋資訊中的客戶端標識;如果所述不可升級列表有所述第一反饋資訊中的客戶端標識,則進入第一刪除子模組。 Preferably, the upgradeable status determining sub-module includes: a client identification judging sub-module for determining whether the unupgradable list has the client identification in the first feedback information; if the unupgradable list has The client identifier in the first feedback information enters the first deletion sub-module.

第一刪除子模組,用於將所述客戶端標識從不可升級列表中刪除。 The first deletion submodule is used to delete the client identifier from the unupgradeable list.

不可升級列表判斷子模組,用於判斷不可升級列表是否為空;如果所述不可升級列表為空時,則進入可升級狀態標記子模組。 The non-upgradeable list judging sub-module is used to determine whether the non-upgradeable list is empty; if the non-upgradeable list is empty, then enter the upgradeable state to mark the sub-module.

可升級狀態標記子模組,用於標記自身的狀態為可升級狀態。 Upgradable status marking sub-modules are used to mark their own status as upgradable.

不可升級狀態確定子模組,用於當接收到第二反饋資訊,則將所述第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態。 The non-upgradeable status determination sub-module is used for when receiving the second feedback information, write the client identifier in the second feedback information into the non-upgradeable list, and mark its own status as the non-upgradeable state.

在本申請另一優選的實施例中,在不可升級狀態確定子模組之後,還包括:時間判斷子模組,用於對於不可升級列表中的客戶端標識,判斷是否在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,如果未在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,則進入第二刪除子模組;第二刪除子模組,用於將所述客戶端標識從不可升級列表中刪除。 In another preferred embodiment of the present application, after the non-upgradeable status determination sub-module, it further includes: a time judging sub-module, which is used to determine whether it is within a specified number of times for the client identifiers in the non-upgradeable list If the second feedback message of the corresponding client is not received within the period, if the second feedback message of the corresponding client is not received within the specified number of time periods, enter the second delete submodule; the second delete submodule, It is used to delete the client identifier from the non-upgradeable list.

實施例七 Example Seven

參照圖7,示出了本申請的一種分布式儲存系統升級裝置實施例的結構方塊圖,具體可以包括如下模組:狀態獲取模組710,用於獲取各資料伺服器的狀態;所述狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;所述資料伺服器的狀態根據所述第一反饋資訊或者第二反饋資訊確定;所述第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得。 Referring to FIG. 7, there is shown a structural block diagram of an embodiment of a distributed storage system upgrade apparatus of the present application, which may specifically include the following modules: a status acquisition module 710 for acquiring the status of each data server; the status Including upgradeable status and non-upgradable status, each data server has a status; the status 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 After the client sends a write request to multiple data servers for the same piece of data to be written, the comparison result of the number of successful writes and the specified number is obtained.

在本申請另一優選的實施例中,在狀態獲取模組710之前,還包括:升級通知發送模組,用於向各資料伺服器發送第一升級通知,使各資料伺服器進入升級準備狀態,並使各資料伺服器在接收到客戶端的存取請求後發送第二升級通知至所述客戶端,以使所述客戶端進入升級準備狀態。 In another preferred embodiment of the present application, before the status acquisition module 710, it further includes: an upgrade notification sending module, configured to send a first upgrade notification to each data server, so that each data server enters the upgrade preparation state , And make each data server send a second upgrade notification to the client after receiving the access request of the client, so that the client enters the upgrade preparation state.

升級通知模組720,用於以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;所述資料伺服器根據所述通知進行升級操作。 The upgrade notification module 720 is configured to notify at least one data server in an upgradeable state to perform the upgrade operation in a round-robin manner; the data server performs the upgrade operation according to the notification.

在本申請另一優選的實施例中,所述升級通知模組包括:第一選擇子模組,用於每次選擇至少一個處於可升級狀態的資料伺服器,通知所述至少一個處於可升級狀態的 資料伺服器執行升級操作;第一監控子模組,用於監控所述至少一個處於可升級狀態的資料伺服器是否全部執行完升級操作;如果所述至少一個處於可升級狀態的資料伺服器全部執行完升級操作,則進入第一選擇子模組。 In another preferred embodiment of the present application, the upgrade notification module includes: a first selection sub-module for selecting at least one data server in an upgradeable state each time, and notifying the at least one data server in an upgradeable state each time The data server in the state performs the upgrade operation; the first monitoring sub-module is used to monitor whether the at least one data server in the upgradeable state has all performed the upgrade operation; if the at least one data server in the upgradeable state has completed the upgrade operation; After completing the upgrade operation, enter the first selection sub-module.

在本申請另一優選的實施例中,在監控子模組之後,還包括:暫停子模組,適於如果監控到任一資料伺服器的升級操作的結果為升級失敗,則將所述資料伺服器加入升級黑名單,暫停對該資料伺服器的升級。 In another preferred embodiment of the present application, after monitoring the sub-module, it further includes: suspending the sub-module, which is adapted to update the data if the result of the monitoring of any data server's upgrade operation is that the upgrade fails. The server is added to the upgrade blacklist, and the upgrade of the data server is suspended.

在本申請另一優選的實施例中,各資料伺服器分佈於至少兩個機架上;則升級通知模組720,包括:升級通知子模組,用於每次選擇處於可升級狀態的資料伺服器最多的機架,通知所述機架中的資料伺服器進行升級操作;所述機架中的各資料伺服器根據所述通知檢查自身的狀態,如果處於可升級狀態,則重啟升級,如果處於不可升級狀態或者升級完畢狀態,則拒絕重啟升級。 In another preferred embodiment of the present application, each data server is distributed on at least two racks; then the upgrade notification module 720 includes: an upgrade notification sub-module for selecting data in an upgradeable state each time The rack with the most servers informs the data servers in the rack to perform the upgrade operation; each data server in the rack checks its own status according to the notification, and if it is in the upgradeable state, restarts the upgrade. If it is in a non-upgradeable state or the upgrade is completed, refuse to restart the upgrade.

在本申請另一優選的實施例中,在升級通知子模組之後,還包括:監控子模組,用於監控所述機架中的資料伺服器是否全部執行完升級操作;如果所述機架中的資料伺服器全部執行完升級操作,則進入升級通知子模組。 In another preferred embodiment of the present application, after the upgrade notification sub-module, it further includes: a monitoring sub-module for monitoring whether all the data servers in the rack have completed the upgrade operation; if the machine After all the data servers in the rack have completed the upgrade operation, enter the upgrade notification sub-module.

實施例八 Example eight

參照圖8和圖8A,其示出了本申請的一種分布式儲存系統升級系統實施例的結構方塊圖,具體可以包括如下模組:多個客戶端810、多個資料伺服器820和升級控制伺服器830。 8 and 8A, which shows a structural block diagram of an embodiment of a distributed storage system upgrade system of the present application, which may specifically include the following modules: multiple clients 810, multiple data servers 820, and upgrade control Server 830.

其中,圖8A其示出本發明實施例的分布式儲存系統的架構示意圖。本申請實施例中每個客戶端可以向分布式儲存系統中的R個發送寫入請求,升級控制伺服器控制所有資料伺服器的升級過程。 Among them, FIG. 8A shows a schematic structural diagram of a distributed storage system according to an embodiment of the present invention. In the embodiment of the present application, each client can send write requests to R in the distributed storage system, and the upgrade control server controls the upgrade process of all data servers.

圖8示出了客戶端810、資料伺服器820、升級控制伺服器830之間的連接關係。 FIG. 8 shows the connection relationship among the client 810, the data server 820, and the upgrade control server 830.

所述客戶端810包括:請求發送模組811,用於對同一份待寫資料,向多個資料伺服器發送寫入請求;判斷模組812,用於接收各資料伺服器回傳的響應,並根據所述響應判斷寫入成功的個數是否大於指定個數;第一反饋模組813,用於如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊;第二反饋模組814,用於如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;所述資料伺服器820包括:資料儲存模組821,用於接收客戶端的寫入請求,並回傳響應給客戶端。 The client 810 includes: a request sending module 811 for sending a write request to multiple data servers for the same piece of data to be written; a judgment module 812 for receiving a response from each data server, And according to the response, it is judged whether the number of successful writing is greater than the specified number; the first feedback module 813 is used to send to each successfully written data server if the number of successful writing is greater than the specified number The first feedback information; the second feedback module 814, 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 used to receive the write request from the client and send back the response to the client.

反饋資訊接收模組822,用於接收客戶端發送的第一反饋資訊或者第二反饋資訊;狀態確定模組823,用於在自身處於未升級的情況下,根據所述第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態。 The feedback information receiving module 822 is used to receive the first feedback information or the second feedback information sent by the client; the status determining module 823 is used to determine the status according to the first feedback information or the second feedback information when it is not upgraded. 2. Feedback information to determine the status of the data server itself.

升級模組824,用於根據升級控制伺服器的通知進行升級操作。 The upgrade module 824 is used to perform the upgrade operation according to the notification from the upgrade control server.

所述升級控制伺服器830包括:狀態獲取模組831,用於獲取各資料伺服器的狀態;升級通知模組832,用於以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作。 The upgrade control server 830 includes: a status acquisition module 831 for acquiring the status of each data server; an upgrade notification module 832 for notifying at least one data server that is in an upgradeable state in a round-robin manner. Upgrade operation.

本申請實施例的客戶端的模組可參照實施例五的描述,資料伺服器的模組可參照實施例六的描述,升級控制器的模組可參照實施例七的描述。其原理基本類似,在此不再贅敘。 For the client module of the embodiment of the present application, please refer to the description of the fifth embodiment, the module of the data server can refer to the description of the sixth embodiment, and the module of the upgrade controller can refer to the description of the seventh embodiment. The principle is basically similar, so I won't repeat it here.

在本申請實施例中,從客戶端、資料伺服器和升級控制伺服器三個方面介紹了本申請的一種分布式儲存系統升級方法。對於存取該分布式儲存系統的客戶端,讓各個客戶端對於同一個待寫資料的寫入請求,同時向多個資料伺服器發送該寫入請求,然後分析在多少個資料伺服器中寫入成功,判斷寫入成功的個數是否大於指定個數,根據該判斷結果向各寫入成功的資料伺服器發送第一反饋資訊或者第二反饋資訊。對於資料伺服器,根據接收到的第一反饋資訊或者第二反饋資訊,確定自身是處於可升級狀態還 是處於不可升級狀態。對於升級控制伺服器,則可以輪循控制處於可升級狀態的資料伺服器進行升級操作。透過上述過程,在升級控制伺服器在以輪循的方式控制可升級狀態的資料伺服器進行升級時,由於由客戶端控制資料伺服器的狀態,並且保證任一客戶端的待寫資料最少寫入指定個數的資料伺服器中以進行備份,因此在不用停止上層服務的情況下,既可以保證分布式儲存系統對客戶端的響應時間較低,也提高了資料的可靠性,大大降低了用戶資料丟失的風險;並且可容忍升級過程中非預期的機器異常,保證服務不受影響。 In the embodiment of the present application, 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. For clients accessing the distributed storage system, let each client send the write request to multiple data servers at the same time for the same write request of the data to be written, and then analyze how many data servers are written If the input is successful, it is determined whether the number of successful writes is greater than the specified number, and the first feedback information or the second feedback information is sent to each successfully written data server according to the determination result. For the data server, according to the received first feedback information or second feedback information, it is determined whether it is in an upgradeable state or a non-upgradable state. For the upgrade control server, the data server in the upgradeable state can be controlled in a round-robin state to perform the upgrade operation. Through the above process, when the upgrade control server controls the data server in an upgradeable state in a round-robin manner to upgrade, the client controls the state of the data server and ensures that the data to be written by any client is at least written A designated number of data servers are used for backup. Therefore, without stopping the upper-level services, the distributed storage system can not only ensure that the response time of the distributed storage system to the client is low, but also improve the reliability of the data and greatly reduce the user data. The risk of loss; and can tolerate unexpected machine abnormalities during the upgrade process to ensure that the service is not affected.

對於裝置實施例而言,由於其與方法實施例基本相似,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.

本說明書中的各個實施例均採用遞進的方式描述,每個實施例重點說明的都是與其他實施例的不同之處,各個實施例之間相同相似的部分互相參見即可。 The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.

本領域內的技術人員應明白,本申請實施例的實施例可提供為方法、裝置、或計算機程式產品。因此,本申請實施例可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本申請實施例可採用在一個或多個其中包含有計算機可用程式代碼的計算機可用儲存媒體(包括但不限於磁碟儲存器、CD-ROM、光學儲存器等)上實施的計算機程式產品的形式。 Those skilled in the art should understand that the embodiments of the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. form.

在一個典型的配置中,所述計算機設備包括一個或多 個處理器(CPU)、輸入/輸出介面、網路介面和內存記憶體。內存記憶體可能包括計算機可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非揮發性內存記憶體等形式,如唯讀記憶體(ROM)或快閃內存記憶體(FLASH RAM)。內存記憶體是計算機可讀媒體的示例。計算機可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是計算機可讀指令、資料結構、程式的模組或其他資料。計算機的儲存媒體的例子包括,但不限於相變內存記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取(RAM)、唯讀記憶體(ROM)、電可抹除可編程唯讀記憶體(EEPROM)、快閃記憶體或其他內存技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁磁碟儲存或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,計算機可讀媒體不包括非持續性的電腦可讀媒體(TRANSITORY MEDIA),如調變的資料信號和載波。 In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. Memory memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory. Body (FLASH RAM). Memory memory is an example of computer-readable media. Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, 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 (RAM), Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) ) Or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices. According to the definition in this article, 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 are described with reference to the flowcharts and/or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal equipment to generate a machine, so that the instructions to be executed by the processor of the computer or other programmable data processing terminal equipment A device for realizing the functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram is generated.

這些計算機程式指令也可儲存在能引導計算機或其他可編程資料處理終端設備以特定方式工作的計算機可讀儲存器中,使得儲存在該計算機可讀儲存器中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方方塊圖一個方塊或多個方塊中指定的功能。 These computer program instructions can also be stored in a computer-readable storage that can guide a computer or other programmable data processing terminal equipment to work in a specific manner, so that the instructions stored in the computer-readable storage produce a manufactured product including the instruction device , The instruction device realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

這些計算機程式指令也可裝載到計算機或其他可編程資料處理終端設備上,使得在計算機或其他可編程終端設備上執行一系列操作步驟以產生計算機實現的處理,從而在計算機或其他可編程終端設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方方塊圖一個方塊或多個方塊中指定的功能的步驟。 These computer program instructions can also be loaded on a computer or other programmable data processing terminal equipment, so that a series of operation steps are executed on the computer or other programmable terminal equipment to produce computer-implemented processing, so that the computer or other programmable terminal equipment The instructions executed above provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

儘管已描述了本申請實施例的優選實施例,但本領域內的技術人員一旦得知了基本創造性概念,則可對這些實施例做出另外的變更和修改。所以,所附權利要求意欲解釋為包括優選實施例以及落入本申請實施例範圍的所有變更和修改。 Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

最後,還需要說明的是,在本文中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個 實體或操作區分開來,而不一定要求或者暗示這些實體或操作之間存在任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要件的過程、方法、物品或者終端設備不僅包括那些要件,而且還包括沒有明確列出的其他要件,或者是還包括為這種過程、方法、物品或者終端設備所固有的要件。在沒有更多限制的情況下,由語句“包括一個......”限定的要件,並不排除在包括所述要件的過程、方法、物品或者終端設備中還存在另外的相同要件。 Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. Or there is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes those elements that are not explicitly listed. The other elements listed, or also include elements inherent to this process, method, article, or terminal device. If there are no more restrictions, the elements defined by the sentence "including a..." do not exclude the existence of other identical elements in the process, method, article, or terminal device that includes the elements.

以上對本申請所提供的一種分布式儲存系統升級方法、一種分布式儲存升級裝置和一種分布式儲存升級系統,進行了詳細介紹,本文中應用了具體個例對本申請的原理及實施方式進行了闡述,以上實施例的說明只是用於幫助理解本申請的方法及其核心思想;同時,對於本領域的一般技術人員,依據本申請的思想,在具體實施方式及應用範圍上均會有改變之處,綜上所述,本說明書內容不應理解為對本申請的限制。 The above provides a detailed introduction to a distributed storage system upgrade method, a distributed storage upgrade device, and a distributed storage upgrade system provided by this application, and specific examples are used in this article to illustrate the principle and implementation of this application. The description of the above embodiments is only used to help understand the methods and core ideas of the application; at the same time, for those of ordinary skill in the art, according to the ideas of the application, there will be changes in the specific implementation and the scope of application In summary, the content of this specification should not be construed as a limitation to this application.

Claims (32)

一種分布式儲存系統升級方法,應用於客戶端,其特徵在於,包括:對同一份待寫資料,向多個資料伺服器發送寫入請求;接收各資料伺服器回傳的響應,並根據該響應判斷寫入成功的個數是否大於指定個數;如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊;如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;其中,該第一反饋資訊或第二反饋資訊供該資料伺服器確定自身的狀態;該狀態包括可升級狀態和不可升級狀態;該資料伺服器的狀態供升級控制伺服器以輪循的方式通知該資料伺服器進行升級操作,其中,該指定個數為預設的寫入成功的最低個數。 A method for upgrading a distributed storage system, applied to a client, is characterized in that it includes: sending a write request to multiple data servers for the same piece of data to be written; receiving a response from each data server, and according to the In response, determine whether the number of successful writes is greater than the specified number; if the number of successful writes is greater than the specified number, the first feedback information will be sent to each data server that successfully writes; if the number of successful writes is not If the number is greater than the specified number, the second feedback information is sent to each successfully written data server; wherein the first feedback information or the second feedback information is used for the data server to determine its own state; the state includes an upgradeable state and Unupgradeable status; the status of the data server is for the upgrade control server to notify the data server of the upgrade operation in a round-robin manner, where the specified number is the preset minimum number of successful writes. 根據申請專利範圍第1項所述的方法,其中,該如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊,供該資料伺服器根據第二反饋資訊確定自身的狀態為不可升級狀態的步驟,包括:如果該寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;如果該寫入成功的小於指定個數,則針對該待寫資料向該多個資料伺服器之外的至少一個資料伺服器發送寫入 請求;接收該至少一個資料伺服器回傳的響應,並結合已寫入成功的個數判斷當前寫入成功的個數是否等於指定個數;如果當前寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊。 According to the method described in item 1 of the scope of patent application, wherein, if the number of successful writes is not greater than the specified number, the second feedback information is sent to each successfully written data server for the data server to follow The second feedback information determines that its own status is not upgradeable. The step includes: if the number of successful writes is equal to a specified number, sending the second feedback information to each data server that successfully writes; if the write is successful If the number of successes is less than the specified number, the data to be written will be sent to at least one data server other than the multiple data servers. Request; receive the response returned by the at least one data server, and combine the number of successful writes to determine whether the current number of successful writes is equal to the specified number; if the current number of successful writes is equal to the specified number, Then, the second feedback information is sent to each data server that has been successfully written. 根據申請專利範圍第1或2項所述的方法,其中,在向各寫入成功的資料伺服器發送第二反饋資訊的步驟之後,還包括:當出現新的待寫資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象,進入對同一份待寫資料,向多個資料伺服器發送寫入請求的步驟。 According to the method described in item 1 or 2 of the scope of patent application, after the step of sending the second feedback information to each successfully written data server, the method further includes: when new data to be written appears, it includes the previously written data. The multiple data servers of the successfully entered data server are targeted, and the step of sending write requests to multiple data servers for the same piece of data to be written is entered. 根據申請專利範圍第3項所述的方法,其中,該第一反饋資訊和第二反饋資訊包括客戶端標識,則該第一反饋資訊或第二反饋資訊供該資料伺服器確定自身的狀態包括:該第二反饋資訊供該資料伺服器在接收到第二反饋資訊後,將第二反饋資訊中的客戶端標識寫入不可升級列表並標記自身的狀態為不可升級狀態;該第一反饋資訊供該資料伺服器在接收到第一反饋資訊後,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 The method according to item 3 of the scope of patent application, wherein the first feedback information and the second feedback information include a client identifier, and the first feedback information or the second feedback information for the data server to determine its own state includes : The second feedback information is for the data server to write the client identification in the second feedback information into the non-upgradeable list and mark its own status as the non-upgradeable state after receiving the second feedback information; the first feedback information After receiving the first feedback information, the data server deletes the client identifier in the first feedback information from the unupgradeable list, and marks its own status as an upgradable state after determining that the unupgradable list is empty. 根據申請專利範圍第1項所述的方法,其中,在對 同一份待寫資料,向多個資料伺服器發送寫入請求的步驟之前,還包括:在存取一資料伺服器時,接收由資料伺服器發送的第二升級通知;根據該第二升級通知進入升級準備狀態。 According to the method described in item 1 of the scope of patent application, Before the step of sending a write request to multiple data servers for the same data to be written, the method further includes: when accessing a data server, receiving a second upgrade notification sent by the data server; according to the second upgrade notification Enter the upgrade preparation state. 一種分布式儲存系統升級方法,應用於資料伺服器,其特徵在於,包括:接收客戶端發送的第一反饋資訊或者第二反饋資訊;該第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得;在自身處於未升級的情況下,根據該第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;該狀態包括可升級狀態和不可升級狀態;該狀態供升級控制伺服器以輪循的方式選擇通知該資料伺服器進行升級操作,其中,該指定個數為預設的寫入成功的最低個數。 A method for upgrading a distributed storage system, applied to a data server, is characterized in that it comprises: receiving first feedback information or second feedback information sent by a client; the first feedback information or second feedback information is based on the same After the data to be written is sent to multiple data servers, the comparison result of the number of successfully written data and the specified number is obtained; in the case of not being upgraded, according to the first feedback information or the second feedback Information to determine the status of the data server itself; the status includes an upgradeable status and an unupgradable status; this status is for the upgrade control server to select and notify the data server to perform the upgrade operation in a round-robin manner, where the specified number is The preset minimum number of successful writes. 根據申請專利範圍第6項所述的方法,其中,該第一反饋資訊和第二反饋資訊包括客戶端標識,則該在自身處於未升級的情況下,根據該第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態的步驟,包括:當接收到第二反饋資訊,則將該第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態;當接收到第一反饋資訊,從不可升級列表中刪除第一 反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 According to the method described in item 6 of the scope of patent application, wherein the first feedback information and the second feedback information include a client identifier, and the user is not upgraded according to the first feedback information or the second feedback Information, the step of determining the status of the data server itself includes: when receiving the second feedback information, writing the client identifier in the second feedback information into the non-upgradeable list, and marking its own status as the non-upgradeable state; When the first feedback information is received, delete the first one from the unupgradeable list The client ID in the feedback information, and after determining that the non-upgradeable list is empty, mark its status as an upgradeable state. 根據申請專利範圍第7項所述的方法,其中,該從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態的步驟,包括:判斷該不可升級列表是否有該第一反饋資訊中的客戶端標識;如果該不可升級列表有該第一反饋資訊中的客戶端標識,則將該客戶端標識從不可升級列表中刪除;判斷不可升級列表是否為空;如果該不可升級列表為空時,則標記自身的狀態為可升級狀態。 The method according to item 7 of the scope of patent application, wherein the step of deleting the client identifier in the first feedback information from the non-upgradeable list, and marking its status as an upgradeable state after determining that the non-upgradable list is empty , Including: determining whether the unupgradable list has the client identifier in the first feedback information; if the unupgradable list has the client identifier in the first feedback information, deleting the client identifier from the unupgradable list ; Determine whether the non-upgradeable list is empty; if the non-upgradeable list is empty, mark its own status as an upgradeable state. 根據申請專利範圍第7項所述的方法,其中,在當接收到第二反饋資訊,則將該第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態的步驟之後,還包括:對於不可升級列表中的客戶端標識,判斷是否在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,如果未在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,則將該客戶端標識從不可升級列表中刪除。 The method according to item 7 of the scope of patent application, wherein when the second feedback information is received, the client identifier in the second feedback information is written into the non-upgradeable list, and its status is marked as the non-upgradeable state After the steps, it also includes: for the client identifiers in the non-upgradeable list, judging whether the second feedback message of the corresponding client has not been received within a specified number of time periods, and if it has not been received within a specified number of time periods When the second feedback message to the corresponding client is received, the client identifier is deleted from the unupgradeable list. 根據申請專利範圍第6項所述的方法,其中,所該接收客戶端發送的第一反饋資訊或者第二反饋資訊的步驟之前,還包括: 接收由升級控制伺服器發送的第一升級通知;根據該第一升級通知進入升級準備狀態,並在接收到客戶端的存取請求後發送第二升級通知至該客戶端,以使該客戶端進入升級準備狀態。 The method according to item 6 of the scope of patent application, wherein, before the step of receiving the first feedback information or the second feedback information sent by the client terminal, the method further includes: Receive the first upgrade notification sent by the upgrade control server; enter the upgrade preparation state according to the first upgrade notification, and send a second upgrade notification to the client after receiving the client's access request, so that the client enters Upgrade preparation status. 一種分布式儲存系統升級方法,應用於升級控制伺服器,其特徵在於,包括:獲取各資料伺服器的狀態;該狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;該資料伺服器的狀態根據第一反饋資訊或者第二反饋資訊確定;該第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得,其中,該指定個數為預設的寫入成功的最低個數。;以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;該資料伺服器根據該通知進行升級操作。 A distributed storage system upgrade method, applied to upgrade control servers, is characterized in that it includes: obtaining the status of each data server; the status includes an upgradeable status and an unupgradable status, and each data server has a status; the The state of the data server is determined based on the first feedback information or the second feedback information; the first feedback information or the second feedback information is written after the client sends a write request to multiple data servers for the same piece of data to be written The result of comparing the number of successes with the specified number is obtained, where the specified number is the preset minimum number of successful writes. ; Notify at least one data server in an upgradeable state to perform the upgrade operation in a round-robin manner; the data server performs the upgrade operation according to the notification. 根據申請專利範圍第11項所述的方法,其中,該以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作的步驟,包括:每次選擇至少一個處於可升級狀態的資料伺服器,通知該至少一個處於可升級狀態的資料伺服器執行升級操作;監控該至少一個處於可升級狀態的資料伺服器是否全部執行完升級操作; 如果該至少一個處於可升級狀態的資料伺服器全部執行完升級操作,則進入下一次選擇至少一個處於可升級狀態的資料伺服器,通知該至少一個處於可升級狀態的資料伺服器執行升級操作的步驟。 The method according to item 11 of the scope of patent application, wherein the step of notifying at least one data server in an upgradeable state to perform an upgrade operation in a round-robin manner includes: selecting at least one data in an upgradeable state each time The server notifies the at least one data server in the upgradeable state to perform the upgrade operation; monitors whether the at least one data server in the upgradeable state has all performed the upgrade operation; If the at least one data server in the upgradeable state has all been upgraded, it will proceed to the next time to select at least one data server in the upgradeable state, and notify the at least one data server in the upgradeable state to perform the upgrade operation. step. 根據申請專利範圍第12項所述的方法,其中,還包括:如果監控到任一資料伺服器的升級操作的結果為升級失敗,則將該資料伺服器加入升級黑名單,暫停對該資料伺服器的升級。 According to the method described in item 12 of the scope of patent application, it further includes: if the result of monitoring any data server's upgrade operation is an upgrade failure, adding the data server to the upgrade blacklist and suspending the data server The upgrade of the device. 根據申請專利範圍第11-13項其中之一所述的方法,其中,各資料伺服器分佈於至少兩個機架上;則該以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作的步驟,包括:每次選擇處於可升級狀態的資料伺服器最多的機架,通知該機架中的資料伺服器進行升級操作;該機架中的各資料伺服器根據該通知檢查自身的狀態,如果處於可升級狀態,則重啟升級,如果處於不可升級狀態或者升級完畢狀態,則拒絕重啟升級。 According to the method described in one of items 11-13 in the scope of patent application, wherein each data server is distributed on at least two racks; then at least one data server in an upgradeable state is notified in a round-robin manner The upgrade operation steps include: selecting the rack with the most data servers in the upgradeable state each time, and informing the data servers in the rack to perform the upgrade operation; each data server in the rack checks according to the notification If it is in the upgradeable state, restart the upgrade if it is in the upgradeable state, and refuse to restart the upgrade if it is in the unupgradable state or the upgrade completed state. 根據申請專利範圍第14項所述的方法,其中,在每次選擇處於可升級狀態的資料伺服器最多的機架,通知該機架中的資料伺服器進行升級操作的步驟之後,還包括:監控該機架中的資料伺服器是否全部執行完升級操作; 如果該機架中的資料伺服器全部執行完升級操作,則進入下一次選擇處於可升級狀態的資料伺服器最多的機架,通知該機架中的資料伺服器進行升級操作的步驟。 According to the method described in item 14 of the scope of patent application, after selecting the rack with the most data servers in the upgradeable state each time and informing the data servers in the rack to perform the upgrade operation, the method further includes: Monitor whether all the data servers in the rack have completed the upgrade operation; If all the data servers in the rack have completed the upgrade operation, the next step is to select the rack with the most data servers in the upgradeable state, and notify the data servers in the rack to perform the upgrade operation. 根據申請專利範圍第11項所述的方法,其中,在獲取各資料伺服器的狀態之前,還包括:向各資料伺服器發送第一升級通知,使各資料伺服器進入升級準備狀態,並使各資料伺服器在接收到客戶端的存取請求後發送第二升級通知至該客戶端,以使該客戶端進入升級準備狀態。 According to the method described in item 11 of the scope of patent application, before acquiring the status of each data server, it further includes: sending a first upgrade notification to each data server, making each data server enter the upgrade preparation state, and making After receiving the access request of the client, each data server sends a second upgrade notification to the client, so that the client enters the upgrade preparation state. 一種分布式儲存系統升級裝置,應用於客戶端,其特徵在於,包括:請求發送模組,用於對同一份待寫資料,向多個資料伺服器發送寫入請求;判斷模組,用於接收各資料伺服器回傳的響應,並根據該響應判斷寫入成功的個數是否大於指定個數;第一反饋模組,用於如果寫入成功的個數大於指定個數,則向各寫入成功的資料伺服器發送第一反饋資訊;第二反饋模組,用於如果寫入成功的個數不大於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;其中,該第一反饋資訊或第二反饋資訊供該資料伺服器確定自身的狀態;該狀態包括可升級狀態和不可升級狀態;該資料伺服器的狀態供升級控制伺服器以輪循的方式通知該資料伺服器進行升級操作,其中,該指定個數為預設的寫入成功的最低個數。 A distributed storage system upgrade device, applied to a client, is characterized in that it comprises: a request sending module for sending write requests to multiple data servers for the same piece of data to be written; a judgment module for Receive the response returned by each data server, and determine whether the number of successful writes is greater than the specified number based on the response; the first feedback module is used to send the The successfully written data server sends the first feedback information; the second feedback module is used to send the second feedback information to each successfully written data server if the number of successful writes is not greater than the specified number; Wherein, the first feedback information or the second feedback information is used for the data server to determine its own state; the state includes an upgradeable state and an unupgradable state; 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, where the specified number is the preset minimum number of successful writes. 根據申請專利範圍第17項所述的裝置,其中,該第二反饋模組,包括:第二反饋資訊發送子模組,用於如果該寫入成功的個數等於指定個數,則向各寫入成功的資料伺服器發送第二反饋資訊;寫入請求發送子模組,用於如果該寫入成功的小於指定個數,則針對該待寫資料向該多個資料伺服器之外的至少一個資料伺服器發送寫入請求;判斷子模組,用於接收該至少一個資料伺服器回傳的響應,並結合已寫入成功的個數判斷當前寫入成功的個數是否等於指定個數;如果當前寫入成功的個數等於指定個數,則進入第二反饋資訊發送子模組。 The device according to item 17 of the scope of patent application, wherein, the second feedback module includes: a second feedback information sending sub-module for sending the data to each The successfully written data server sends the second feedback information; the write request sending sub-module is used to send the data to be written to a data server other than the plurality of data servers if the successfully written data is less than the specified number At least one data server sends a write request; the judging sub-module is used to receive the response returned by the at least one data server, and combine the number of successful writes to determine whether the current number of successful writes is equal to the specified number Number; if the number of currently written successfully is equal to the specified number, enter the second feedback information sending sub-module. 根據申請專利範圍第17或18項所述的裝置,其中,在第二反饋模組之後,還包括:新待寫資料發送模組,用於當出現新的待寫資料,以包括之前寫入成功的資料伺服器的多個資料伺服器為對象,進入請求發送模組。 According to the device according to item 17 or 18 of the scope of patent application, after the second feedback module, it further includes: a new data to be written sending module, which is used to include the new data to be written when there is new data to be written. Multiple data servers of the successful data server are targeted, enter the request sending module. 根據申請專利範圍第19項所述的裝置,其中,該第一反饋資訊和第二反饋資訊包括客戶端標識,則該第一反饋資訊或第二反饋資訊供該資料伺服器確定自身的狀態包括:該第二反饋資訊供該資料伺服器在接收到第二反饋資訊後,將第二反饋資訊中的客戶端標識寫入不可升級列表並標記自身的狀態為不可升級狀態; 該第一反饋資訊供該資料伺服器在接收到第一反饋資訊後,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 The device according to item 19 of the scope of patent application, wherein the first feedback information and the second feedback information include a client identifier, and the first feedback information or the second feedback information for the data server to determine its own state includes : The second feedback information is for the data server to write the client identifier in the second feedback information into the non-upgradeable list and mark its own status as the non-upgradeable state after receiving the second feedback information; The first feedback information is used by the data server to delete the client identifier in the first feedback information from the unupgradable list after receiving the first feedback information, and mark its own status as available after determining that the unupgradable list is empty. Upgrade status. 根據申請專利範圍第17項所述的裝置,其中,在對同一份待寫資料,向多個資料伺服器發送寫入請求的步驟之前,還包括:第二升級通知接收模組,用於在存取一資料伺服器時,接收由資料伺服器發送的第二升級通知;第二升級準備模組,用於根據該第二升級通知進入升級準備狀態。 The device according to item 17 of the scope of patent application, wherein, before the step of sending a write request to multiple data servers for the same piece of data to be written, it further includes: a second upgrade notification receiving module for When a data server is accessed, a second upgrade notification sent by the data server is received; the second upgrade preparation module is used to enter an upgrade preparation state according to the second upgrade notification. 一種分布式儲存系統升級裝置,應用於資料伺服器,其特徵在於,包括:反饋資訊接收模組,用於接收客戶端發送的第一反饋資訊或者第二反饋資訊;該第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得,其中,該指定個數為預設的寫入成功的最低個數。;狀態確定模組,用於在自身處於未升級的情況下,根據該第一反饋資訊或者第二反饋資訊,確定資料伺服器自身的狀態;該狀態包括可升級狀態和不可升級狀態;該狀態供升級控制伺服器以輪循的方式選擇通知該資料伺服器進行升級操作。 A distributed storage system upgrade device applied to a data server is characterized by comprising: a feedback information receiving module for receiving first feedback information or second feedback information sent by a client; the first feedback information or the second feedback information 2. The feedback information is obtained based on the comparison result of the number of successful writes and the specified number after the client sends a write request to multiple data servers for the same piece of data to be written, where the specified number is the default write The minimum number of successful entries. ; The status determination module is used to determine the status of the data server itself based on the first feedback information or the second feedback information when it is not upgraded; the status includes an upgradeable status and an unupgradable status; the status For the upgrade control server to choose to notify the data server to perform the upgrade operation in a round-robin manner. 根據申請專利範圍第22項所述的裝置,其中,該 狀態確定模組,包括:不可升級狀態確定子模組,用於當接收到第二反饋資訊,則將該第二反饋資訊中的客戶端標識寫入不可升級列表,並標記自身的狀態為不可升級狀態;可升級狀態確定子模組,用於當接收到第一反饋資訊,從不可升級列表中刪除第一反饋資訊中的客戶端標識,並在確定不可升級列表為空後標記自身的狀態為可升級狀態。 The device according to item 22 of the scope of patent application, wherein the The status determination module includes: a non-upgradeable status determination sub-module, which is used to write the client identifier in the second feedback information into the non-upgradeable list when receiving the second feedback information, and mark its own status as non-upgradeable Upgrade status; the upgradeable status determination sub-module is used to delete the client ID in the first feedback information from the non-upgradeable list when the first feedback information is received, and mark its own status after determining that the non-upgradeable list is empty It is in an upgradeable state. 根據申請專利範圍第23項所述的裝置,其中,該可升級狀態確定子模組,包括:客戶端標識判斷子模組,用於判斷該不可升級列表是否有該第一反饋資訊中的客戶端標識;如果該不可升級列表有該第一反饋資訊中的客戶端標識,則進入第一刪除子模組;第一刪除子模組,用於將該客戶端標識從不可升級列表中刪除;不可升級列表判斷子模組,用於判斷不可升級列表是否為空;如果該不可升級列表為空時,則進入可升級狀態標記子模組;可升級狀態標記子模組,用於標記自身的狀態為可升級狀態。 The device according to item 23 of the scope of patent application, wherein the upgradeable status determination sub-module includes: a client identification determination sub-module for determining whether the non-upgradable list has the client in the first feedback information Terminal identification; if the unupgradable list has the client identification in the first feedback information, enter the first deletion submodule; the first deletion submodule is used to delete the client identification from the unupgradable list; The unupgradable list judging submodule is used to determine whether the unupgradable list is empty; if the unupgradable list is empty, it enters the upgradeable state to mark the submodule; the upgradeable state marks the submodule to mark its own The status is upgradeable. 根據申請專利範圍第23項所述的裝置,其中,在不可升級狀態確定子模組之後,還包括:時間判斷子模組,用於對於不可升級列表中的客戶端 標識,判斷是否在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,如果未在指定個數的時間週期內未接收到相應客戶端的第二反饋消息,則進入第二刪除子模組;第二刪除子模組,用於將該客戶端標識從不可升級列表中刪除。 The device according to item 23 of the scope of patent application, wherein, after the non-upgradeable state determination sub-module, it further includes: a time judgment sub-module, which is used for the client in the non-upgradeable list Identifies whether the second feedback message of the corresponding client is not received within a specified number of time periods. If the second feedback message of the corresponding client is not received within the specified number of time periods, enter the second delete sub Module; the second deletion sub-module is used to delete the client ID from the unupgradeable list. 根據申請專利範圍第22項所述的裝置,其中,在反饋資訊接收模組之前,還包括:第一升級通知接收模組,用於接收由升級控制伺服器發送的第一升級通知;第一升級準備模組,用於根據該第一升級通知進入升級準備狀態,並在接收到客戶端的存取請求後發送第二升級通知至該客戶端,以使該客戶端進入升級準備狀態。 The device according to item 22 of the scope of patent application, wherein, before the feedback information receiving module, it further includes: a first upgrade notification receiving module, configured to receive the first upgrade notification sent by the upgrade control server; The upgrade preparation module is configured to enter the upgrade preparation state according to the first upgrade notification, and send a second upgrade notification to the client after receiving the client's access request, so that the client enters the upgrade preparation state. 一種分布式儲存系統升級裝置,應用於升級控制伺服器,其特徵在於,包括:狀態獲取模組,用於獲取各資料伺服器的狀態;該狀態包括可升級狀態和不可升級狀態,每個資料伺服器有一個狀態;該資料伺服器的狀態根據第一反饋資訊或者第二反饋資訊確定;該第一反饋資訊或第二反饋資訊根據客戶端對同一份待寫資料向多個資料伺服器發送寫入請求後,寫入成功的個數與指定個數的比較結果獲得,其中,該指定個數為預設的寫入成功的最低個數;升級通知模組,用於以輪循的方式通知至少一個處於可升級狀態的資料伺服器進行升級操作;該資料伺服器根 據該通知進行升級操作。 A distributed storage system upgrade device, applied to upgrade control servers, is characterized by comprising: a status acquisition module for acquiring the status of each data server; the status includes an upgradeable status and an unupgradable status, and each data The server has a state; the state of the data server is determined based on the first feedback information or the second feedback information; the first feedback information or the second feedback information is sent to multiple data servers based on the same piece of data to be written by the client After the write request, the result of comparing the number of successful writes with the specified number is obtained, where the specified number is the preset minimum number of successful writes; the upgrade notification module is used in a round-robin manner Notify at least one data server in an upgradeable state to perform the upgrade operation; the data server root Perform the upgrade operation according to the notification. 根據申請專利範圍第27項所述的裝置,其中,該升級通知模組包括:第一選擇子模組,用於每次選擇至少一個處於可升級狀態的資料伺服器,通知該至少一個處於可升級狀態的資料伺服器執行升級操作;第一監控子模組,用於監控該至少一個處於可升級狀態的資料伺服器是否全部執行完升級操作;如果該至少一個處於可升級狀態的資料伺服器全部執行完升級操作,則進入第一選擇子模組。 The device according to item 27 of the scope of patent application, wherein the upgrade notification module includes: a first selection sub-module for selecting at least one data server in an upgradeable state each time, and notifying the at least one data server in an upgradeable state each time The data server in the upgrade state performs the upgrade operation; the first monitoring sub-module is used to monitor whether the at least one data server in the upgradeable state has completed the upgrade operation; if the at least one data server in the upgradeable state has been completed After performing all upgrade operations, enter the first selection sub-module. 根據申請專利範圍第28項所述的裝置,其中,還包括:暫停子模組,適於如果監控到任一資料伺服器的升級操作的結果為升級失敗,則將該資料伺服器加入升級黑名單,暫停對該資料伺服器的升級。 The device according to item 28 of the scope of patent application, which further includes: a suspension sub-module, adapted to add the data server to the upgrade black if the result of the upgrade operation of any data server is monitored as an upgrade failure List, the upgrade of the data server is suspended. 根據申請專利範圍第27-29項其中之一所述的裝置,其中,各資料伺服器分佈於至少兩個機架上;則該升級通知模組,包括:升級通知子模組,用於每次選擇處於可升級狀態的資料伺服器最多的機架,通知該機架中的資料伺服器進行升級操作;該機架中的各資料伺服器根據該通知檢查自身的狀態,如果處於可升級狀態,則重啟升級,如果處於不可升級狀態或者升級完畢狀態,則拒絕重啟升級。 According to the device according to one of items 27-29 in the scope of patent application, each data server is distributed on at least two racks; then the upgrade notification module includes: an upgrade notification sub-module for each Select the rack with the most data servers in the upgradeable state, and notify the data servers in the rack to perform the upgrade operation; each data server in the rack checks its own status according to the notification, and if it is in the upgradeable state , Restart the upgrade, if it is in the unupgradeable state or the upgrade is completed state, refuse to restart the upgrade. 根據申請專利範圍第30項所述的裝置,其中,在 升級通知子模組之後,還包括:第二監控子模組,用於監控該機架中的資料伺服器是否全部執行完升級操作;如果該機架中的資料伺服器全部執行完升級操作,則進入升級通知子模組。 The device according to item 30 of the scope of patent application, wherein After the upgrade notification sub-module, it also includes: a second monitoring sub-module, which is used to monitor whether all the data servers in the rack have completed the upgrade operation; if all the data servers in the rack have completed the upgrade operation, Then enter the upgrade notification sub-module. 根據申請專利範圍第27項所述的裝置,其中,在狀態獲取模組之前,還包括:升級通知發送模組,用於向各資料伺服器發送第一升級通知,使各資料伺服器進入升級準備狀態,並使各資料伺服器在接收到客戶端的存取請求後發送第二升級通知至該客戶端,以使該客戶端進入升級準備狀態。 The device according to item 27 of the scope of patent application, before the status acquisition module, further includes: an upgrade notification sending module, which is used to send a first upgrade notification to each data server so that each data server enters the upgrade And make each data server send a second upgrade notification to the client after receiving the access request of the client, so that the client enters the upgrade preparation state.
TW106102727A 2017-01-24 2017-01-24 Method and device for upgrading distributed storage system TWI735521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106102727A TWI735521B (en) 2017-01-24 2017-01-24 Method and device for upgrading distributed storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106102727A TWI735521B (en) 2017-01-24 2017-01-24 Method and device for upgrading distributed storage system

Publications (2)

Publication Number Publication Date
TW201828090A TW201828090A (en) 2018-08-01
TWI735521B true TWI735521B (en) 2021-08-11

Family

ID=63960260

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106102727A TWI735521B (en) 2017-01-24 2017-01-24 Method and device for upgrading distributed storage system

Country Status (1)

Country Link
TW (1) TWI735521B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200934179A (en) * 2008-01-29 2009-08-01 Inventec Corp A method for simultaneously linking a server by a plurality of client nodes
US20140019519A1 (en) * 2002-10-30 2014-01-16 Riverbed Technology, Inc. Reliability and availability of distributed servers
CN104202385A (en) * 2014-08-27 2014-12-10 四川长虹电器股份有限公司 Data backup and updating method of distributed file system
TW201502774A (en) * 2013-03-14 2015-01-16 Microsoft Corp Coordinating fault recovery in a distributed system
US20150229537A1 (en) * 2008-11-26 2015-08-13 Red Hat, Inc. Policy enforcement in a distributed computing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140019519A1 (en) * 2002-10-30 2014-01-16 Riverbed Technology, Inc. Reliability and availability of distributed servers
TW200934179A (en) * 2008-01-29 2009-08-01 Inventec Corp A method for simultaneously linking a server by a plurality of client nodes
US20150229537A1 (en) * 2008-11-26 2015-08-13 Red Hat, Inc. Policy enforcement in a distributed computing system
TW201502774A (en) * 2013-03-14 2015-01-16 Microsoft Corp Coordinating fault recovery in a distributed system
CN104202385A (en) * 2014-08-27 2014-12-10 四川长虹电器股份有限公司 Data backup and updating method of distributed file system

Also Published As

Publication number Publication date
TW201828090A (en) 2018-08-01

Similar Documents

Publication Publication Date Title
WO2017114213A1 (en) Method and apparatus for upgrading distributed storage system
US10261853B1 (en) Dynamic replication error retry and recovery
US11847329B2 (en) Techniques for implementing fault domain sets
US10439937B2 (en) Service addressing in distributed environment
EP3039844B1 (en) System and method for supporting partition level journaling for synchronizing data in a distributed data grid
CN111277460A (en) ZooKeeper containerization control method and device, storage medium and electronic equipment
US9984139B1 (en) Publish session framework for datastore operation records
CN108491163B (en) Big data processing method and device and storage medium
US20160098331A1 (en) Methods for facilitating high availability in virtualized cloud environments and devices thereof
US11500812B2 (en) Intermediate file processing method, client, server, and system
US9195528B1 (en) Systems and methods for managing failover clusters
CN113821168A (en) Shared storage migration system and method, electronic equipment and storage medium
WO2024021469A1 (en) System operation and maintenance management method and apparatus, and electronic device
US20120272253A1 (en) Distributed multi-system management
CN107943615B (en) Data processing method and system based on distributed cluster
CN110569112B (en) Log data writing method and object storage daemon device
TWI735521B (en) Method and device for upgrading distributed storage system
EP4250119A1 (en) Data placement and recovery in the event of partition failures
CN105205160A (en) Data write-in method and device
US10942821B1 (en) Method and apparatus for dynamic binding and unbinding thin logical storage volumes to snapshots of a file system
WO2017078707A1 (en) Method and apparatus for recovering in-memory data processing system
WO2016007230A9 (en) Methods for faciltating high availability storage services and devices thereof
CN114564153A (en) Volume mapping removing method, device, equipment and storage medium
US11740918B2 (en) Method for accessing application logs within virtual machines based on operator-defined criteria
TW201828087A (en) Service node switching method and device for distributed storage system providing logical judgment and data statistics to enhance service availability