CN116450662A - User information management method of multi-node tenant and related components - Google Patents

User information management method of multi-node tenant and related components Download PDF

Info

Publication number
CN116450662A
CN116450662A CN202310418692.0A CN202310418692A CN116450662A CN 116450662 A CN116450662 A CN 116450662A CN 202310418692 A CN202310418692 A CN 202310418692A CN 116450662 A CN116450662 A CN 116450662A
Authority
CN
China
Prior art keywords
tenant
user information
node
target
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310418692.0A
Other languages
Chinese (zh)
Inventor
陶钰昕
王帅阳
贾涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data 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 Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202310418692.0A priority Critical patent/CN116450662A/en
Publication of CN116450662A publication Critical patent/CN116450662A/en
Pending legal-status Critical Current

Links

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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • 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/22Indexing; Data structures therefor; Storage structures
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems

Landscapes

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

Abstract

The invention discloses a multi-node tenant management method and related components, which relate to the technical field of computers, and enable a storage node storing user information of a target tenant to monitor the target tenant, when a user of the target tenant changes the user information of the target tenant on a certain storage node, the storage node can send the changed user information to all storage nodes monitoring the target tenant in a distributed storage system, so that when the user information of the target tenant on the certain storage node changes, all storage nodes containing the user information of the target tenant correspondingly change along with the user information, so that the user information of the same tenant synchronously changes on different storage nodes, the situation of abnormal data storage is avoided, and the accuracy and reliability of data storage are improved.

Description

User information management method of multi-node tenant and related components
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and related components for managing user information of a multi-node tenant.
Background
As a technology that has been attracting more interest in recent years, a multi-tenant technology (Software as a Service, saaS) can make a set of storage systems shared by multiple tenants and isolated from each other by adopting a one-to-many delivery mode. With the rapid development of network technology, the distributed storage system also starts to adopt a multi-tenant technology, and storage resources formed by a plurality of storage nodes are distributed and scheduled by taking tenants as units, namely, each storage node can store data from different tenants, the data contained by the same tenant can be stored on different storage nodes, and the data of different tenants are not affected; the tenant also comprises a plurality of users, user information of the users is also stored on different storage nodes, and the users can change data comprising the user information contained in the tenant.
The existing tenant management method only can manage the user information stored on a single node, when a user of a target tenant changes the user information of the target tenant on a certain storage node, namely, when the user information of the target tenant stored by the storage node has a state change event, other storage nodes containing the user information of the tenant cannot correspondingly change, synchronous change of the user information of the same tenant on different storage nodes cannot be realized, abnormal data storage is easy to occur, and reliability is low.
Disclosure of Invention
The invention aims to provide a user information management method of multi-node tenants and related components, which enable a storage node storing user information of a target tenant to monitor the target tenant, when a user of the target tenant changes the user information of the target tenant on a certain storage node, the storage node can send the changed user information to all storage nodes monitoring the target tenant in a distributed storage system, and further realize that when the user information of the target tenant on a certain storage node changes, all storage nodes containing the user information of the target tenant change correspondingly, so that the user information of the same tenant synchronously changes on different storage nodes, the situation of abnormal data storage is avoided, and the accuracy and reliability of data storage are improved.
In order to solve the above technical problems, the present invention provides a method for managing user information of a multi-node tenant, which is applied to any storage node in a distributed storage system, and includes:
after detecting that the first user information stored by the user equipment generates a state change event, determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information;
determining first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system according to the tenant identifiers;
and sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification, so that the storage node monitoring the target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and the tenant identification.
Preferably, after determining the first node identities of all storage nodes monitoring the target tenant in the distributed storage system according to the tenant identities, the method further includes:
judging whether the second node identification of the second node identification is in the first node identifications of all storage nodes monitoring the target tenant;
And if not, monitoring the target tenant according to the tenant identification.
Preferably, sending the first user information and the tenant identifier to a storage node monitoring the target tenant according to the first node identifier includes:
encoding the first user information and the tenant identification to obtain first encoded information;
and sending the first coding information to a storage node monitoring the target tenant according to the first node identification.
Preferably, the method further comprises:
receiving second coding information sent by a storage node monitoring the target tenant;
decoding the second encoded information to obtain second user information and the tenant identification;
and changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
Preferably, before the user information of the target tenant stored by the user information is changed according to the second user information and the tenant identification, the method further comprises:
decoding the second encoded information to obtain a third node identifier of the storage node of the target tenant;
judging whether the second node identifier of the self is in the third node identifier or not;
If yes, judging that the second coded information is sent by the user, and keeping the user information of the target tenant stored by the user;
if not, the method proceeds to the step of changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
Preferably, the state change event includes any one or more of adding a user in the target tenant, deleting a user in the target tenant, and updating user information of an existing user of the target tenant.
Preferably, determining, according to the tenant identifier, first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system includes:
invoking a Watch/Notify mechanism according to the tenant identification;
determining first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system through a Watch/Notify mechanism;
sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification, including:
invoking a Watch/Notify mechanism according to the first node identifier;
and sending the first user information and the tenant identification to a storage node monitoring the target tenant through a Watch/Notify mechanism.
The present invention also provides a storage node of a distributed storage system, comprising:
the tenant confirmation module is used for determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information after detecting that the first user information stored by the tenant confirmation module generates a state change event;
a storage node confirmation module, configured to determine, according to the tenant identifier, first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system;
and the message sending module is used for sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification so that the storage node monitoring the target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and the tenant identification.
Preferably, the message sending module further includes:
the first storage node checking module is used for judging whether the second node identifier of the first storage node checking module is in the first node identifiers of all storage nodes monitoring the target tenant;
and the monitoring module is used for monitoring the target tenant according to the tenant identification when the second node identification of the monitoring module is not in the first node identifications of all the storage nodes monitoring the target tenant.
Preferably, the message sending module includes:
the encoding module is used for encoding the first user information and the tenant identification to obtain first encoded information;
and the code sending module is used for sending the first code information to a storage node monitoring the target tenant according to the first node identification.
Preferably, the method further comprises:
the code receiving module is used for receiving and monitoring second code information sent by the storage node of the target tenant;
the first decoding module is used for decoding the second coding information to obtain second user information and the tenant identification;
and the change module is used for changing the user information of the target tenant stored by the change module according to the second user information and the tenant identification.
Preferably, the modification module further includes:
the second decoding module is used for decoding the second encoded information to obtain a third node identifier of the storage node of the monitoring target tenant;
the first storage node checking module is used for judging whether the second node identifier of the first storage node checking module is in the third node identifier;
and the information holding module is used for judging that the second coded information is sent by the user when the second node identifier of the user is in the third node identifier, and holding the user information of the target tenant stored by the user.
As a preferred embodiment, the state change event includes any one or more of adding a user to the target tenant, deleting a user from the target tenant, and updating user information of an existing user of the target tenant.
Preferably, the storage node acknowledgement module comprises:
the first calling module is used for calling a Watch/Notify mechanism according to the tenant identification;
the Watch module is used for determining first node identifications of all storage nodes monitoring the target tenant in the distributed storage system through a Watch/Notify mechanism;
a message sending module, comprising:
the second calling module is used for calling a Watch/Notify mechanism according to the first node identification;
and the Notify module is used for sending the first user information and the tenant identification to a storage node monitoring the target tenant through a Watch/Notify mechanism.
The invention also provides a user information management device of the multi-node tenant, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the user information management method of the multi-node tenant when executing the computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the multi-node tenant user information management method as described above.
According to the multi-node tenant management method and the related components, the storage node storing the user information of the target tenant monitors the target tenant, when the user of the target tenant changes the user information of the target tenant on a certain storage node, the storage node sends the changed user information to all storage nodes monitoring the target tenant in the distributed storage system, and further when the user information of the target tenant on the certain storage node changes, all storage nodes containing the user information of the target tenant correspondingly change, so that the user information of the same tenant synchronously changes on different storage nodes, the situation of abnormal data storage is avoided, and the accuracy and reliability of data storage are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a logic flow diagram of a method for managing user information of a multi-node tenant according to an embodiment of the present invention;
fig. 2 is a logic flow diagram of user information synchronization modification of a user information management method of a multi-node tenant according to an embodiment of the present invention;
FIG. 3 is a logic flow diagram of another method for user information management of a multi-node tenant according to an embodiment of the present invention;
FIG. 4 is a logic flow diagram of a user information synchronization change of another method for managing user information of a multi-node tenant according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a storage node of a distributed storage system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a user information management device of a multi-node tenant according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a user information management method of multi-node tenants and related components, which enable a storage node storing user information of a target tenant to monitor the target tenant, when a user of the target tenant changes the user information of the target tenant on a certain storage node, the storage node can send the changed user information to all storage nodes monitoring the target tenant in a distributed storage system, and further realize that when the user information of the target tenant on a certain storage node changes, all storage nodes containing the user information of the target tenant change correspondingly, so that the user information of the same tenant synchronously changes on different storage nodes, the situation of abnormal data storage is avoided, and the accuracy and reliability of data storage are improved.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a logic flow diagram of a method for managing user information of a multi-node tenant, which is provided in an embodiment of the present invention, and is applied to any storage node in a distributed storage system, and includes:
s101: after detecting that the first user information stored by the user equipment generates a state change event, determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information;
s102: determining first node identifiers of storage nodes of all monitoring target tenants in the distributed storage system according to tenant identifiers;
s103: and sending the first user information and the tenant identification to a storage node of the monitoring target tenant according to the first node identification, so that the storage node of the monitoring target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and tenant identification.
The multi-tenant feature provides unified resource management based on tenant granularity, allocating and managing resources in tenant units. The multi-tenant characteristic can enable a set of storage system to be shared by a plurality of tenants, the running cost of the system is reduced by sharing software and hardware resources, the resource utilization rate of the system is improved, and inter-tenant resource isolation is achieved, so that safety and privacy are ensured.
In an enterprise scene, when unstructured storage is deployed in an enterprise, the enterprise can respectively establish tenants for different departments in an organization, each tenant allocates and manages own resources, the resources among different departments share the same set of physical storage, but the resources are logically isolated according to the tenants, so that the security requirements among different resources are ensured. And the whole tends to cloud deployment (such as rapid development and application of cloud computing platforms of government service cloud, police service cloud and the like) so as to improve the whole resource utilization rate.
It should be noted that, the execution body of the embodiment of the present application is any storage node in a distributed storage system, where each storage node is generally a storage server, and the storage servers are interconnected through a high-speed network, that is, the storage nodes are interconnected through a high-speed network. The number of storage nodes in the distributed storage system is not particularly limited, and a person skilled in the art should make corresponding settings according to the actual situation. Furthermore, the execution body of the embodiment of the present application may be a preset storage node for monitoring the target tenant, or may be a storage node actively monitored by a program under control of the program after the user information of the target tenant stored by the execution body is changed, so long as it is possible to implement that all storage nodes storing the user information of the target tenant are synchronously changed when the state change event occurs in the first user information stored by the execution body.
For step S101, the specific content of the state change event is not limited, and may be, for example, a new user in the target tenant, a user in the target tenant may be deleted, user information of an existing user of the target tenant may be updated, or a combination of any of the above. The method for updating the user information of the existing user of the target tenant may be to modify the name, authority, password, etc. of the existing user, which is not limited in this embodiment, and may be determined according to actual situations.
In order to realize isolation of resources, the data contained in the tenants all carry the tenant identifications of the tenants to which the data belong, namely, the user information of the user under the tenants also carries the tenant identifications of the tenants to which the data belong, the tenant identifications of different tenants are different, and further, the data of different tenants can be distinguished through the tenant identifications, and accordingly, the tenant identifications of the target tenants corresponding to the user information can be determined through the user information.
In step S102, the storage node of the monitoring target tenant may be a preset storage node of the monitoring target tenant, or may be a storage node that is actively monitored by a program after the user information of the target tenant stored in the storage node is changed, so long as it is possible to implement a synchronous change with the storage node in which the state change event occurs when the state change event occurs in the user information of the storage node in which the user information of the target tenant is stored. Further, the embodiment is not limited to a specific method for determining the first node identifications of all the storage nodes of the monitoring target tenants in the distributed storage system according to the tenant identifications, and for a specific determination manner, a person skilled in the art should make a corresponding setting according to the actual situation, for example, the Watch/Notify mechanism may be called according to the tenant identifications, and the first node identifications of all the storage nodes of the monitoring target tenants in the distributed storage system may be determined through the Watch/Notify mechanism.
Among them, the Watch/Notify mechanism is an important communication mechanism in a distributed storage system, and is used to communicate between different storage nodes, so that states between the storage nodes remain consistent. The Watch/Notify mechanism operates in a similar manner to the information publish-subscribe mode, with messages subscribed to by Watch, and messages published by Notify: when a user performs a state change event on user information of a target tenant stored on a storage node, the storage node monitors the target tenant through a communication interface provided by a Watch/Notify mechanism, namely, when the user information of the target tenant stored on the storage node later occurs the state change event, a notification is sent to the storage node monitoring the target tenant through Notify.
For step S103, the embodiment is not limited to a specific transmission mode and transmission flow for transmitting the first user information and the tenant identifier to the storage node of the monitoring target tenant, for example, the first user information and the tenant identifier may be directly transmitted to the storage node of the monitoring target tenant one by one, the first user information and the tenant identifier may be packaged and encoded, after the monitoring encoded information is in a correct format, the encoded information obtained by encoding may be transmitted to the storage node of the monitoring target tenant, or other transmission modes and transmission flows may be used, and a corresponding setting should be made by those skilled in the art according to actual situations.
Further, the embodiment does not limit the specific change operation and change flow of the storage node of the monitoring target tenant to change the user information of the target tenant stored by the storage node according to the received first user information and the tenant identifier, for example, after the first user information and the tenant identifier are received, a state change event generated by the first user information is obtained by analyzing according to the first user information and the tenant identifier, the user information of the target tenant stored by the storage node of the monitoring target tenant is changed, or after the encoded information is received, the received encoded information is decoded to obtain the first user information and the tenant identifier, then a state change event generated by the first user information is obtained by analyzing according to the first user information and the tenant identifier, and the user information of the target tenant stored by the storage node of the monitoring target tenant is changed.
According to the multi-node tenant management method provided by the invention, the storage node storing the user information of the target tenant monitors the target tenant, when the user of the target tenant changes the user information of the target tenant on a certain storage node, the storage node sends the changed user information to all storage nodes monitoring the target tenant in the distributed storage system, and further, when the user information of the target tenant on a certain storage node changes, all the storage nodes containing the user information of the target tenant correspondingly change, so that the user information of the same tenant synchronously changes on different storage nodes, the situation of abnormal data storage is avoided, and the accuracy and reliability of data storage are improved.
Based on the above embodiments:
as a preferred embodiment, after determining the first node identities of all storage nodes of the monitoring target tenant in the distributed storage system according to the tenant identities in S102, the method further includes:
judging whether the second node identification of the second node identification is in the first node identifications of all storage nodes of the monitoring target tenant;
if not, monitoring the target tenant according to the tenant identification.
In a specific embodiment, node identifiers of storage nodes of all monitoring target tenants are obtained, a set formed by the node identifiers is used as a first node identifier, if the first node identifier does not have the same node identifier as the second node identifier of the first node identifier, namely the second node identifier of the first node identifier is not in the first node identifiers of the storage nodes of all monitoring target tenants, the storage node is indicated to be not preset to enable the storage node to monitor the target tenants, and at the moment, the storage node needs to be controlled to monitor the target tenants so as to send a notification to the storage nodes of the same monitoring target tenants, so that other storage nodes synchronously perform an operation of changing user information of the target tenants stored by the storage node according to a state change event.
In the embodiment, whether the second node identifier is in the first node identifiers of all the storage nodes for monitoring the target tenant is judged, so that when the condition that the state change event occurs in the user information of the target tenant exists on the storage node for monitoring the target tenant is not preset, the storage node can monitor the target tenant, each storage node for storing the user information of the target tenant is ensured to monitor the target tenant, synchronous change of the user information of the same tenant among different storage nodes is realized, and the accuracy and the reliability of data storage are improved.
As a preferred embodiment, according to S103, the sending, to the storage node of the monitoring target tenant, the first user information and the tenant identification, includes:
encoding the first user information and the tenant identification to obtain first encoded information;
and sending the first coding information to a storage node of the monitoring target tenant according to the first node identification.
The embodiment does not limit a specific encoding method for encoding the first user information and the tenant identifier, nor limit a specific type of the first encoded information, where the specific encoding method and the specific encoding type depend on a storage node receiving the first encoded information in practical application, and a person skilled in the art should make a corresponding setting according to practical situations.
According to the method, the first user information and the tenant identification are encoded, and then the encoding result is sent to the storage node of the monitoring target tenant, so that the situation that packet loss or data disorder possibly occurs in the process of directly sending the first user information and the tenant identification is avoided, the sending and receiving of the first user information and the tenant identification are more stable, and the reliability and stability of data synchronization are improved.
Referring to fig. 2, fig. 2 is a logic flow diagram of user information synchronization modification of a user information management method of a multi-node tenant according to an embodiment of the present invention:
as a preferred embodiment, further comprising:
s201: receiving second coding information sent by a storage node of a monitoring target tenant;
s202: decoding the second encoded information to obtain second user information and tenant identification;
s203: and changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
The embodiment is not limited to a specific receiving method for receiving the second encoded information sent by the storage node of the monitoring target tenant, nor is it limited to a specific decoding process for decoding the second encoded information, and a person skilled in the art should make a corresponding setting according to the actual situation.
In a specific embodiment, a specific change manner of changing the user information of the target tenant stored by the user according to the second user information and the tenant identifier depends on a state change event generated by the user information of the target tenant on the storage node sending the second coding information, for example, when the state change event includes a newly added user in the target tenant, the change manner of changing the user information of the target tenant stored by the user according to the second user information and the tenant identifier may be a change manner of changing the user information of the target tenant stored by the user according to the tenant identifier, and newly adding the user information of the newly added user to the user information stored by the user according to the second user information; when the state change event includes deleting the user in the target tenant, the change mode of changing the user information of the target tenant stored by the user according to the second user information and the tenant identification can be that the user information stored by the user can be found according to the tenant identification, and the user information of the deleted user is correspondingly deleted on the self storage node according to the second user information; when the state change event includes updating the user information of the existing user of the target tenant, the change mode of changing the user information of the target tenant stored by the user according to the second user information and the tenant identifier may be that the user information stored by the user is found according to the tenant identifier, and the user information of the existing user stored by the user is changed correspondingly according to the second user information.
When receiving the second encoded information sent by the storage node of the monitoring target tenant, the embodiment changes the user information of the target tenant stored by the storage node according to the second user information and the tenant identification obtained after decoding, so as to realize synchronous change with the storage node of the monitoring target tenant, meet the service requirement and improve the accuracy and reliability of data storage.
As a preferred embodiment, before S203 changes the user information of the target tenant stored by itself according to the second user information and the tenant identifier, the method further includes:
decoding the second encoded information to obtain a third node identifier of the storage node of the monitoring target tenant;
judging whether the second node identifier of the self is in the third node identifier or not;
if yes, judging that the second coded information is sent by the user, and keeping the user information of the target tenant stored by the user;
if not, the process proceeds to S203 to change the user information of the target tenant stored in the process according to the second user information and the tenant identification.
In this embodiment, whether the code information is sent by itself is determined by whether the second node identifier of the second node is in the third node identifier of the storage node of the monitoring target tenant, and when the code information is monitored to be sent by itself, the user information of the target tenant stored by the second node identifier of the second node is not required to be modified according to the code information, so that repeated change and synchronization operations are avoided, the efficiency of data synchronization is improved, the risk of abnormal data update possibly existing in the change process is also reduced, and the accuracy of data storage is improved.
As a preferred embodiment, the state change event includes any one or a combination of more of adding users in the target tenant, deleting users in the target tenant, and updating user information of existing users of the target tenant.
In a specific embodiment, when the state change event includes a newly added user in the target tenant, the storage node monitoring the target tenant changes the user information of the target tenant stored by itself according to the received first user information and the tenant identifier, so as to find the user information stored by itself according to the tenant identifier, and newly add the user information of the newly added user to the user information stored by itself according to the second user information; when the state change event comprises deleting the user in the target tenant, the storage node of the monitoring target tenant changes the change mode of the user information of the target tenant stored by the storage node according to the received first user information and tenant identification, the user information stored by the storage node can be found according to the tenant identification, and the user information of the deleted user is correspondingly deleted on the storage node according to the second user information; when the state change event includes updating the user information of the existing user of the target tenant, the storage node monitoring the target tenant changes the user information of the target tenant stored by itself according to the received first user information and the tenant identifier, so as to find the user information stored by itself according to the tenant identifier, and correspondingly change the user information of the existing user stored by itself according to the second user information.
The embodiment provides specific conditions of various state change events, and the change methods corresponding to different state change events are different, so that the user of the target tenant between the storage nodes is synchronously added and deleted, and the user information of the existing user of the target tenant is synchronously updated, the abnormal data storage condition caused by abnormal user information is avoided, and the accuracy and the reliability of data storage are improved.
As a preferred embodiment, determining, according to tenant identities, first node identities of storage nodes of all monitoring target tenants in the distributed storage system includes:
invoking a Watch/Notify mechanism according to the tenant identification;
determining first node identifiers of storage nodes of all monitoring target tenants in the distributed storage system through a Watch/Notify mechanism;
sending the first user information and the tenant identification to a storage node of the monitoring target tenant according to the first node identification, wherein the method comprises the following steps:
invoking a Watch/Notify mechanism according to the first node identifier;
and sending the first user information and the tenant identification to a storage node of the monitoring target tenant through a Watch/Notify mechanism.
In a specific embodiment, after the Watch/Notify mechanism is called, a listwatcmers method of the Watch/Notify mechanism may be used to obtain all the watches of the target tenant according to the tenant identifier, that is, determine first node identifiers of all storage nodes of the monitoring target tenant in the distributed storage system, and then call a message publishing method of the Watch/Notify mechanism to Notify the storage nodes of all the Watch target tenant, that is, determine the storage nodes of the monitoring target tenant according to the first node identifiers, and send the first user information and the tenant identifier to the storage nodes through Notify.
According to the embodiment, the storage nodes monitor target tenants and send user information and tenant identifications among the storage nodes through the Watch/Notify mechanism, the Watch/Notify mechanism is an open source mechanism based on the distributed storage system, the existing project or application can be embedded in the Watch/Notify mechanism, the storage nodes of the distributed storage system can synchronously update among the storage nodes, the operation is simple, and the implementation efficiency is high.
In a specific embodiment, a storage node is provided with a tenant user data storage, a tenant object checker, a tenant object monitor, a user information encoder, a tenant user message publisher, a user information decoder, a tenant user information checker, and a tenant user information processor, which are implemented by program codes, and please refer to fig. 3, fig. 3 is a logic flow chart of another user information management method of a multi-node tenant provided by an embodiment of the present invention:
s301: after detecting that the first user information stored by the user equipment generates a state change event, determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information;
s302: determining first node identifiers of storage nodes of all monitoring target tenants in the distributed storage system according to tenant identifiers;
S303: judging whether the second node identification of the second node identification is in the first node identifications of all storage nodes of the monitoring target tenant;
s304: monitoring a target tenant according to the tenant identification;
s305: encoding the first user information and the tenant identification to obtain first encoded information;
s306: and sending the first coding information to a storage node of the monitoring target tenant according to the first node identification.
When a user uses the distributed storage system to operate user information under the affiliated tenant, namely after the storage node detects that the first user information stored by the storage node generates a state change event, the storage node can change the first user information, determines a target tenant containing the first user information and a tenant identification of the target tenant according to the first user information, packages the first user information and the tenant identification of the target tenant, and sends the package to the tenant user data storage so as to realize the storage function of the storage node.
After the first user information is stored, the tenant object checker calls the listwatcmers method of the Watch/Notify mechanism according to tenant identifications to acquire all the watches of the target tenant, namely, the first node identifications of all the storage nodes for monitoring the target tenant in the distributed storage system are determined, whether the acquired watches of the target tenant exist in own nodes or not is checked, namely, whether the second node identifications of the own nodes are in the first node identifications of the storage nodes for monitoring the target tenant or not is judged, if not, the tenant object monitor calls the Watch method of the Watch/Notify mechanism according to the tenant identifications, and the target tenant is monitored.
The user information encoder sorts and encodes the tenant identification of the target tenant, the second node identification of the current storage node and the changed first user information of the target tenant into a specific message format, obtains first encoded information and sends the first encoded information to the message publisher; after the message publisher checks that the coded message format is correct, a message publishing method of a Watch/Notify mechanism is called, and a storage node of a Watch target tenant is determined according to a first node identifier, namely, first coding information is sent to the storage node of a monitoring target tenant.
Referring to fig. 4, fig. 4 is a logic flow diagram of user information synchronization modification of another method for managing user information of a multi-node tenant according to an embodiment of the present invention:
s401: receiving second coding information sent by a storage node of a monitoring target tenant;
s402: decoding the second encoded information to obtain second user information, a third node identifier of a storage node of the monitoring target tenant and a tenant identifier;
s403: judging whether the second node identifier of the self is in the third node identifier or not;
s403: if yes, judging that the second coded information is sent by the user, and keeping the user information of the target tenant stored by the user;
S405: if not, changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
When the storage node receives the issued second coding information, the second coding information is transmitted to a user information decoder for decoding, so that second user information, a third node identifier of the storage node of the monitoring target tenant and a tenant identifier are obtained; the tenant user information checker judges whether the second node identifier of the checker is in the third node identifier, if so, the checker judges that the second code information is sent by the checker and keeps the user information of the target tenant stored by the checker; if not, the tenant user message processor changes the user information of the target tenant stored by the tenant user message processor according to the second user information and the tenant identification, and sends a changed result to the tenant user data storage to realize the storage function of the storage node.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a storage node of a distributed storage system according to an embodiment of the present invention, including:
the tenant confirmation module 501 is configured to determine, according to the changed first user information, a target tenant containing the first user information and a tenant identifier of the target tenant after detecting that the first user information stored in the tenant confirmation module itself has a status change event;
A storage node confirmation module 502, configured to determine, according to the tenant identifier, first node identifiers of storage nodes of all monitoring target tenants in the distributed storage system;
the message sending module 503 is configured to send, according to the first node identifier, the first user information and the tenant identifier to a storage node of the monitoring target tenant, so that the storage node of the monitoring target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and tenant identifier.
As a preferred embodiment, the message sending module 503 further includes:
the first storage node checking module is used for judging whether the second node identification of the first storage node checking module is in the first node identifications of all storage nodes of the monitoring target tenant;
and the monitoring module is used for monitoring the target tenant according to the tenant identification when the second node identification of the monitoring module is not in the first node identifications of the storage nodes of all the monitoring target tenants.
As a preferred embodiment, the message sending module 503 includes:
the coding module is used for coding the first user information and the tenant identification to obtain first coding information;
and the code sending module is used for sending the first code information to the storage node of the monitoring target tenant according to the first node identification.
As a preferred embodiment, further comprising:
the code receiving module is used for receiving second code information sent by the storage node of the monitoring target tenant;
the first decoding module is used for decoding the second coding information to obtain second user information and tenant identification;
and the change module is used for changing the user information of the target tenant stored by the change module according to the second user information and the tenant identification.
As a preferred embodiment, the modification module further includes:
the second decoding module is used for decoding the second encoded information to obtain a third node identifier of the storage node of the monitoring target tenant;
the first storage node checking module is used for judging whether the second node identifier of the first storage node checking module is in the third node identifier;
and the information holding module is used for judging that the second coded information is sent by the user when the second node identifier of the user is in the third node identifier, and holding the user information of the target tenant stored by the user.
As a preferred embodiment, the state change event includes any one or a combination of more of adding users in the target tenant, deleting users in the target tenant, and updating user information of existing users of the target tenant.
As a preferred embodiment, the storage node acknowledgement module 502 includes:
the first calling module is used for calling a Watch/Notify mechanism according to the tenant identification;
the Watch module is used for determining first node identifications of storage nodes of all monitoring target tenants in the distributed storage system through a Watch/Notify mechanism;
the message sending module 503 includes:
the second calling module is used for calling a Watch/Notify mechanism according to the first node identification;
the Notify module is used for sending the first user information and the tenant identification to the storage node of the monitoring target tenant through a Watch/Notify mechanism.
For an introduction of a storage node of a distributed storage system provided by the present invention, refer to the above embodiment, and the disclosure is not repeated herein.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a user information management device of a multi-node tenant according to an embodiment of the present invention, including:
a memory 601 for storing a computer program;
a processor 602 for implementing the steps of the metadata management method as described above when executing a computer program.
The processor 602 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 602 may be implemented in at least one hardware form of a DSP (Digital Signal Processor ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 602 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a central processor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 602 may integrate a GPU (graphics processing unit, graphics processor) for responsible for rendering and rendering of content required for display by the display screen. In some embodiments, the processor 602 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 601 may include one or more computer-readable storage media, which may be non-transitory. The memory 601 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 601 is at least configured to store a computer program, where the computer program, after being loaded and executed by the processor 602, is capable of implementing the relevant steps of the user information management method of the multi-node tenant disclosed in any one of the foregoing embodiments. In addition, the resources stored in the memory 601 may further include an operating system, data, and the like, and the storage manner may be transient storage or permanent storage. The operating system may include Windows, unix, linux, among others. The data may include, but is not limited to, data of a user information management method of the multi-node tenant, and the like.
In some embodiments, the user information management device of the multi-node tenant may further comprise a display screen, an input-output interface, a communication interface, a power supply and a communication bus.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the user information management device of the multi-node tenant, and may include more or less components than illustrated.
For the description of the user information management device of the multi-node tenant provided by the present invention, reference is made to the above embodiment, and the description of the present invention is omitted here.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention, a target computer readable storage medium 701 is stored with a computer program 702, and the target computer program 702 implements the steps of the user information management method of the multi-node tenant when being executed by a processor.
It will be appreciated that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as a separate product, it may be stored in a computer readable storage medium 701. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution contributing to the prior art, or in a software product stored in a storage medium, performing all or part of the steps of the methods of the various embodiments of the present application. In particular, the computer readable storage medium 701 may include, but is not limited to, any type of disk including floppy disks, optical disks, and removable hard disks, etc., or any type of medium or device suitable for storing instructions, data, etc., which are not particularly limited herein.
For an introduction to a computer readable storage medium provided by the present invention, reference should be made to the above embodiments, and the disclosure is not repeated here.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The user information management method of the multi-node tenant is characterized by being applied to any storage node in a distributed storage system and comprising the following steps of:
after detecting that the first user information stored by the user equipment generates a state change event, determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information;
determining first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system according to the tenant identifiers;
and sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification, so that the storage node monitoring the target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and the tenant identification.
2. The multi-node tenant user information management method of claim 1, further comprising, after determining a first node identification of all storage nodes monitoring the target tenant in the distributed storage system from the tenant identification:
judging whether the second node identification of the second node identification is in the first node identifications of all storage nodes monitoring the target tenant;
and if not, monitoring the target tenant according to the tenant identification.
3. The multi-node tenant management method of claim 1, wherein sending the first user information and the tenant identification to a storage node that monitors the target tenant according to the first node identification comprises:
encoding the first user information and the tenant identification to obtain first encoded information;
and sending the first coding information to a storage node monitoring the target tenant according to the first node identification.
4. The multi-node tenant user information management method of claim 2, further comprising:
receiving second coding information sent by a storage node monitoring the target tenant;
decoding the second encoded information to obtain second user information and the tenant identification;
And changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
5. The multi-node tenant user information management method of claim 4, further comprising, prior to altering the user information of the target tenant stored by itself based on the second user information and the tenant identification:
decoding the second encoded information to obtain a third node identifier of the storage node of the target tenant;
judging whether the second node identifier of the self is in the third node identifier or not;
if yes, judging that the second coded information is sent by the user, and keeping the user information of the target tenant stored by the user;
if not, the method proceeds to the step of changing the user information of the target tenant stored by the user according to the second user information and the tenant identification.
6. The multi-node tenant user information management method of claim 1, wherein the state change event includes a combination of any one or more of adding a user to the target tenant, deleting a user from the target tenant, and updating user information of an existing user of the target tenant.
7. The multi-node tenant management method of any one of claims 1 to 6, wherein determining, from the tenant identities, a first node identity of all storage nodes in the distributed storage system that monitor the target tenant comprises:
invoking a Watch/Notify mechanism according to the tenant identification;
determining first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system through a Watch/Notify mechanism;
sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification, including:
invoking a Watch/Notify mechanism according to the first node identifier;
and sending the first user information and the tenant identification to a storage node monitoring the target tenant through a Watch/Notify mechanism.
8. A storage node of a distributed storage system, comprising:
the tenant confirmation module is used for determining a target tenant containing the first user information and a tenant identification of the target tenant according to the changed first user information after detecting that the first user information stored by the tenant confirmation module generates a state change event;
A storage node confirmation module, configured to determine, according to the tenant identifier, first node identifiers of all storage nodes monitoring the target tenant in the distributed storage system;
and the message sending module is used for sending the first user information and the tenant identification to a storage node monitoring the target tenant according to the first node identification so that the storage node monitoring the target tenant changes the user information of the target tenant stored by the storage node according to the received first user information and the tenant identification.
9. A user information management apparatus of a multi-node tenant, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the user information management method of a multi-node tenant according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, characterized in that the target computer readable storage medium has stored thereon a computer program, which when executed by a processor, implements the steps of the user information management method of a multi-node tenant according to any one of claims 1 to 7.
CN202310418692.0A 2023-04-14 2023-04-14 User information management method of multi-node tenant and related components Pending CN116450662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310418692.0A CN116450662A (en) 2023-04-14 2023-04-14 User information management method of multi-node tenant and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310418692.0A CN116450662A (en) 2023-04-14 2023-04-14 User information management method of multi-node tenant and related components

Publications (1)

Publication Number Publication Date
CN116450662A true CN116450662A (en) 2023-07-18

Family

ID=87135345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310418692.0A Pending CN116450662A (en) 2023-04-14 2023-04-14 User information management method of multi-node tenant and related components

Country Status (1)

Country Link
CN (1) CN116450662A (en)

Similar Documents

Publication Publication Date Title
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
US9614646B2 (en) Method and system for robust message retransmission
CN108572898B (en) Method, device, equipment and storage medium for controlling interface
CN111787126B (en) Container creation method, server, and storage medium
CN106575245B (en) Distributed workload reallocation with communication failure
KR100747466B1 (en) A device management client and device management method using nodes having additional properties
JP2010218049A (en) Information processing apparatus, information processing method, and program
CN109766172B (en) Asynchronous task scheduling method and device
US9374417B1 (en) Dynamic specification auditing for a distributed system
US10425475B2 (en) Distributed data management
US9712477B2 (en) Email notifications
CN103501237A (en) Device management method, management platform, device and system
US20180242177A1 (en) Monitoring management method and apparatus
CN109783573A (en) The method of data synchronization and terminal of multichannel push
US20070050447A1 (en) Method and device arrangement for managing a client/server environment
CN113765871B (en) Method and device for managing fort machine
CN116450662A (en) User information management method of multi-node tenant and related components
CN110620736B (en) Method and device for flow scheduling
CN109460291B (en) Electronic device, method for elastically controlling server cluster and storage medium
CN113467723A (en) Data storage method, device, equipment and medium
CN112488462A (en) Unified pushing method, device and medium for workflow data
US9917701B2 (en) Communication device
CN115914380A (en) Communication delay optimization method of cloud computing resource manager based on ZLib compression algorithm
CN114185688B (en) Physical resource occupation state correction method, scheduler and readable storage medium
CN111919419A (en) Node, network system and data synchronization method

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