CN112860668B - Method for realizing Store disabling and enabling functions - Google Patents

Method for realizing Store disabling and enabling functions Download PDF

Info

Publication number
CN112860668B
CN112860668B CN202110199658.XA CN202110199658A CN112860668B CN 112860668 B CN112860668 B CN 112860668B CN 202110199658 A CN202110199658 A CN 202110199658A CN 112860668 B CN112860668 B CN 112860668B
Authority
CN
China
Prior art keywords
store
state
state value
disable
enable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110199658.XA
Other languages
Chinese (zh)
Other versions
CN112860668A (en
Inventor
杨帅
徐伟涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202110199658.XA priority Critical patent/CN112860668B/en
Publication of CN112860668A publication Critical patent/CN112860668A/en
Application granted granted Critical
Publication of CN112860668B publication Critical patent/CN112860668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for realizing a Store disabling and enabling function, and relates to the technical field of distributed database load management; and adding an attribute state to the Store to represent the state of the Store, carrying out state assignment on the Store, filtering out the Store with the state value DISABLE, only leaving the Store with the state value DISABLE to carry out the rebalancing of the cluster, and modifying the Store with the state value DISABLE into the Store with the state value ENABLE to ENABLE the Store with the state value DISABLE to participate in the rebalancing so as to realize the switching of Store disabling and enabling.

Description

Method for realizing Store disabling and enabling functions
Technical Field
The invention discloses a method, relates to the technical field of distributed database load management, and particularly relates to a method for realizing a Store disabling and enabling function.
Background
In the existing distributed database, when a store is newly added into a cluster, the cluster is easy to generate a state of unbalanced load due to the fact that the new store with lower load is detected to enter the cluster, and the cluster performs rebalance of the store at the moment, so that a new load balancing state is achieved.
Therefore, when a disk replacement operation is completed in a normal running cluster, the cluster needs to be paused or stopped to replace a new disk after a node in the disk to be replaced completes a normal offline process, and during this period, the cluster cannot normally provide services to the outside, so that the development of a corresponding distributed database is very limited.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method for realizing the memory disabling and enabling functions, which completes the design of the memory disabling and enabling functions by controlling the rebaance of the memory, can be applied to the scenes such as disk replacement and the like which need to be manually controlled, and completes the disk replacement operation in the normal running process of the cluster, thereby improving the availability of the database.
The specific scheme provided by the invention is as follows:
a method for realizing a Store disable and enable function, which aims at the state of a Store represented by a Store added attribute state, carries out state assignment on the Store,
filtering out the store with the state value of DISABLE, only leaving the store with the state value of ENABLE to carry out the rebaance of the cluster,
and (3) modifying the Store with the state value DISABLE into the Store with the state value ENABLE, so that the Store with the original state value DISABLE participates in the rebaance, and switching between Store disabling and enabling is realized.
Further, in the method for implementing the Store disable and enable function, the state assignment of the Store is performed:
analyzing the cmd command, judging whether the command for the state in the command meets the requirement,
if so, the state value in the cmd command is assigned to the state of the store,
otherwise, returning.
Further, in the method for realizing the Store disable and enable function, the state assignment of the Store is modified:
judging whether the state value of the store can be obtained, and if the state value of the store is DISABLE, changing the state value of the store into ENABLE by utilizing an update command.
A system for realizing Store disable and enable functions comprises an adding module, an assignment module, a filtering module and a switching module,
the adding module adds attribute state for the store to represent the state of the store, the assigning module assigns state to the store,
the filtering module filters out the store with the state value of DISABLE, only leaves the store with the state value of ENABLE to carry out the rebaance of the cluster,
the switching module changes the Store with the state value DISABLE into the Store with the state value ENABLE, so that the Store with the original state value DISABLE participates in the rebaance, and the switching of the Store disabling and enabling is realized.
Further, the assignment module in the Store disable and enable function implementation system performs Store state assignment:
analyzing the cmd command, judging whether the command for the state in the command meets the requirement,
if so, the state value in the cmd command is assigned to the state of the store,
otherwise, returning.
Further, the switching module in the Store disable and enable function implementation system modifies the state assignment of the Store:
judging whether the state value of the store can be obtained, and if the state value of the store is DISABLE, changing the state value of the store into ENABLE by utilizing an update command.
An implementation apparatus for a Store disable and enable function, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program and execute the method for implementing the Store disable and enable function.
A computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the method of implementing a Store disable and enable function.
The invention has the advantages that:
the invention provides a method for realizing a Store disabling and enabling function, which aims at the state of a Store, wherein an attribute state is added to the Store to represent the state of the Store, the Store with a state value of DISABLE is filtered, and only the Store with a state value of ENABLE is left to carry out the rebaance of a cluster, namely, the method is used for processing the scenes of replacing a disk and the like, which need to manually control the rebaance of the Store, so that the cluster can replace the disk under the condition of normal operation, and the cluster does not need to be suspended or stopped, thereby greatly increasing the availability of a database.
Meanwhile, the Store with the state value DISABLE can be modified into the Store with the state value ENABLE, so that the Store with the original state value DISABLE participates in the rebaance, the switching of Store disabling and enabling is realized, and the flexibility of use of the Store in the cluster is improved.
Drawings
FIG. 1 is a schematic diagram of a state assignment flow for a store of the method of the present invention;
FIG. 2 is a schematic diagram of a state value status determination process in the method of the present invention;
FIG. 3 is a schematic flow diagram of a prior art rebaance;
FIG. 4 is a schematic flow chart of rebaLance in the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and specific examples, which are not intended to be limiting, so that those skilled in the art will better understand the invention and practice it.
The invention provides a method for realizing Store disable and enable functions, which aims at the state of a Store represented by adding attribute state to the Store, carries out state assignment to the Store,
filtering out the store with the state value of DISABLE, only leaving the store with the state value of ENABLE to carry out the rebaance of the cluster,
and (3) modifying the Store with the state value DISABLE into the Store with the state value ENABLE, so that the Store with the original state value DISABLE participates in the rebaance, and switching between Store disabling and enabling is realized. The method of the invention can be used for completing the forbidden and enabled function design of the store by controlling the rebaance of the store, and can be finally applied to the scenes needing to manually control the rebaance, such as disk replacement, etc.
In particular applications, the method of the present invention is utilized in a distributed database, such as Langchao cloud stream database ZNBase, where in some embodiments, the disabling and enabling of the Store is primarily for rebaance. In the prior art, the policy of rebaance selects a suitable store from the stores of the current cluster according to the survival condition of the store to form a list, and then selects a target from the list according to the load condition of the store. In the method of the invention, a state is added in the state of the store, the value is DISABLE or ENABLE, the store with the state of ENABLE is defined as the store which needs to participate in the rebaance, the other stores are defined as the store which does not participate in the rebaance, the store which participates in the rebaance is selected from the store to form a list, the state=DISABLE is filtered, and only the store with the state=ENABLE is left for rebaance, so that the store except for ENABLE does not participate in the rebaance. If the store with the state value DISABLE is needed to participate in the rebaance, the state value can be modified to ENABLE by utilizing an update command, namely, the store with the state value DISABLE is added into the list of the uncompensation, and the store is logically processed according to the store of the uncompensation, so that the transfer of the duplicate on the store can be completed, and then the rebaance is carried out.
In other embodiments of the method of the present invention, a Store's assignment process is exemplified, wherein the metadata. Pro file may be modified prior to assignment such that a new state is added to the Store descriptor, either with a DISABLE or ENABLE value, and then the state is added to the method of initializing the Store, the RocksDBConfig is modified, and the state is added, and each time a Store is initialized, the state of the Store is initialized. To be able to obtain the state of the store, the state may be added to the system table bidb_internal. Kv_store_state, and querying this system table can obtain the state parameters of the store. Referring to FIG. 1, a state command is added to a cmd command, a state value is obtained by parsing the cmd command, and then the command is transferred to a storage layer to complete state assignment. The process is as follows:
analyzing the cmd command, judging whether the cmd command meets the requirement, if so, judging whether the command for the state in the command meets the requirement,
if yes, the state value in the cmd command is assigned to the state of the store, otherwise, the method returns.
The method can rapidly and timely process the scene of the rebaance needing to manually control the store, such as changing the disk, and the like, and the cluster can be changed under the condition of normal operation without suspending or stopping the cluster, so that the availability of the database can be greatly increased.
The invention also provides a system for realizing the Store disable and enable function, which comprises an adding module, an assignment module, a filtering module and a switching module,
the adding module adds attribute state for the store to represent the state of the store, the assigning module assigns state to the store,
the filtering module filters out the store with the state value of DISABLE, only leaves the store with the state value of ENABLE to carry out the rebaance of the cluster,
the switching module changes the Store with the state value DISABLE into the Store with the state value ENABLE, so that the Store with the original state value DISABLE participates in the rebaance, and the switching of the Store disabling and enabling is realized. The content of information interaction and execution process between the modules in the system is based on the same concept as the method embodiment of the present invention, and specific content can be referred to the description in the method embodiment of the present invention, which is not repeated here.
The invention provides a device for realizing Store disabling and enabling functions, which comprises: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program and execute the method for implementing the Store disable and enable function. The content of the information interaction and the readable program process of the processor in the device is based on the same concept as the embodiment of the method of the present invention, and the specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The invention also provides a computer readable medium, wherein the computer readable medium stores computer instructions, and the computer instructions, when executed by a processor, cause the processor to execute the method for realizing the Store disabling and enabling functions. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer by a communication network.
Further, it should be apparent that the functions of any of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion unit is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
It should be noted that, in the above preferred embodiments, not all steps and modules in each flow and each system structure are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
The above-described embodiments are merely preferred embodiments for fully explaining the present invention, and the scope of the present invention is not limited thereto. Equivalent substitutions and modifications will occur to those skilled in the art based on the present invention, and are intended to be within the scope of the present invention. The protection scope of the invention is subject to the claims.

Claims (4)

1. A method for realizing a Store disabling and enabling function is characterized in that attribute state is added to a Store to represent the state of the Store, the Store is assigned with state, and the Store is assigned with state: analyzing the cmd command, judging whether the command aiming at the state meets the requirement or not, if so, assigning the state value in the cmd command to the state of the store, otherwise, returning;
filtering out the store with the state value of DISABLE, and only leaving the store with the state value of ENABLE to carry out the rebaance of the cluster;
by modifying the store with the state value DISABLE to the store with the state value ENABLE, the store with the original state value DISABLE participates in the rebaance, and the state assignment of the store is modified: judging whether the state value of the store can be obtained, and if the state value of the store is DISABLE, changing the state value of the store into ENABLE by utilizing an update command;
switching between Store disable and enable is achieved.
2. A system for realizing Store disable and enable functions is characterized by comprising an adding module, an assignment module, a filtering module and a switching module,
the adding module is used for adding attribute states to the store to represent the states of the store, the assigning module is used for assigning states of the store, and the assigning module is used for assigning states of the store: analyzing the cmd command, judging whether the command aiming at the state meets the requirement or not, if so, assigning the state value in the cmd command to the state of the store, otherwise, returning;
the filtering module filters out the store with the state value of DISABLE, and only leaves the store with the state value of ENABLE to carry out the rebaance of the cluster;
the switching module changes the store with the state value of DISABLE into the store with the state value of ENABLE, so that the store with the original state value of DISABLE participates in the rebaance, and the state assignment of the store is modified: judging whether the state value of the Store can be obtained, if so, changing the state value of the Store into ENABLE by utilizing an update command to realize switching between Store disabling and enabling.
3. A Store disable and enable feature implementation apparatus, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor configured to invoke the machine-readable program to perform a Store disable and enable feature implementation method of claim 1.
4. A computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform a method of implementing a Store disable and enable function as claimed in claim 1.
CN202110199658.XA 2021-02-23 2021-02-23 Method for realizing Store disabling and enabling functions Active CN112860668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110199658.XA CN112860668B (en) 2021-02-23 2021-02-23 Method for realizing Store disabling and enabling functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110199658.XA CN112860668B (en) 2021-02-23 2021-02-23 Method for realizing Store disabling and enabling functions

Publications (2)

Publication Number Publication Date
CN112860668A CN112860668A (en) 2021-05-28
CN112860668B true CN112860668B (en) 2023-07-14

Family

ID=75989878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110199658.XA Active CN112860668B (en) 2021-02-23 2021-02-23 Method for realizing Store disabling and enabling functions

Country Status (1)

Country Link
CN (1) CN112860668B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573052A (en) * 2015-01-21 2015-04-29 浪潮电子信息产业股份有限公司 Method for replacing storage based on Oracle ASM
CN110413225A (en) * 2019-06-28 2019-11-05 苏州浪潮智能科技有限公司 Highly reliable cluster-based storage dual-active configuration method, system, terminal and storage medium
CN112256694A (en) * 2020-09-16 2021-01-22 苏宁云计算有限公司 Hive table state changing method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11030315B2 (en) * 2013-05-21 2021-06-08 Google Llc Systems, methods, and computer program products for managing disabling of services
CN104520811B (en) * 2014-05-09 2017-07-28 华为技术有限公司 The system and method for the startup time of computer of the optimization with multiple central processing units
US10353918B2 (en) * 2014-11-07 2019-07-16 Amobee, Inc. High availability and disaster recovery in large-scale data warehouse
US10713615B2 (en) * 2017-01-30 2020-07-14 Oracle International Corporation System and method for rebalancing inter-store retail inventories utilizing overstock inventory
US10706038B2 (en) * 2017-07-27 2020-07-07 Cisco Technology, Inc. System and method for state object data store
US11157064B2 (en) * 2017-09-28 2021-10-26 Intel Corporation Techniques to dynamically enable and disable accelerator devices in compute environments
CN108710661B (en) * 2018-05-11 2020-10-27 武汉轻工大学 Method and device for realizing data management of text file based on memory sequence list
CN109871373B (en) * 2019-01-31 2021-06-08 北京明略软件系统有限公司 Data storage method and device and computer readable storage medium
CN111090537B (en) * 2019-12-16 2024-02-06 无锡华云数据技术服务有限公司 Cluster starting method and device, electronic equipment and readable storage medium
CN111897696A (en) * 2020-08-05 2020-11-06 腾讯科技(深圳)有限公司 Server cluster hard disk state detection method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573052A (en) * 2015-01-21 2015-04-29 浪潮电子信息产业股份有限公司 Method for replacing storage based on Oracle ASM
CN110413225A (en) * 2019-06-28 2019-11-05 苏州浪潮智能科技有限公司 Highly reliable cluster-based storage dual-active configuration method, system, terminal and storage medium
CN112256694A (en) * 2020-09-16 2021-01-22 苏宁云计算有限公司 Hive table state changing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Vue的前端开发框架的设计与实现;徐鹏涛;《硕士学位论文》;全文 *

Also Published As

Publication number Publication date
CN112860668A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US10671289B2 (en) Tenant-level sharding of disks with tenant-specific storage modules to enable policies per tenant in a distributed storage system
CN101730099B (en) Terminal management method based on authority control and device
CN103631633A (en) Virtual machine total-system online migration method, device and system
CN112565047B (en) Method, device, equipment and medium for constructing network by using VPP in docker
CN105635311A (en) Method for synchronizing resource pool information in cloud management platform
US8958420B1 (en) Methods and apparatus for virtualizing switch control plane engine
CN108319492A (en) Reset the method, apparatus and system of physical machine
CN102148715A (en) Method and device for virtual network configuration migration
CN115396377B (en) Method, device, equipment and storage medium for optimizing service quality of object storage
US20160182403A1 (en) Automatic creation of affinity-type rules for resources in distributed computer systems
EP3703342B1 (en) Dynamic load balancing in network centric process control systems
CN113296931A (en) Resource control method, system, computing device and storage medium
CN112527450B (en) Super-fusion self-adaptive method, terminal and system based on different resources
CN103336670A (en) Method and device for automatic distribution of data blocks based on data temperature
CN112860668B (en) Method for realizing Store disabling and enabling functions
CN111163060B (en) Application group-based forwarding method, device and system
US11301436B2 (en) File storage method and storage apparatus
CN117608856A (en) Memory expansion method, system, terminal and storage medium for NVMe (network video Me) acceleration card
CN105162833A (en) Client computer management system and method applied to diskless workstation
CN113220235A (en) Read-write request processing method, device, equipment and storage medium
CN109976870A (en) Creation method, device, equipment and the medium of virtual machine
CN113127430A (en) Mirror image information processing method and device, computer readable medium and electronic equipment
CN107547622B (en) Resource adjusting method and device
CN112019361A (en) Migration method and device of access control list, storage medium and electronic equipment
US20180074749A1 (en) Storage device, management device, storage system, data migration method, and computer-readable recording medium

Legal Events

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