Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
FENCING OUT NODES IN A DISTRIBUTED CLUSTERED SYSTEM
Document Type and Number:
WIPO Patent Application WO/2019/028236
Kind Code:
A1
Abstract:
Techniques are disclosed relating to fencing out a first one of a plurality of nodes configured to handle requests for data stored in a distributed storage. A database system, in various embodiments, stores a value indicating that the first node is permitted to update a catalog stored at a metadata server. In response to a determination to prevent the first node from updating the catalog and writing to the distributed storage, in various embodiments, the database system updates the value to indicate that the first node is not permitted to update the catalog and instructs the distributed storage to prevent write operations to a particular portion allocated to the first node for writing data.

Inventors:
WYATT, Nathaniel (The Landmark, One MarketSuite 30, San Francisco California, 94105, US)
RASPUDIC, Steven (The Landmark, One MarketSuite 30, San Francisco California, 94105, US)
JUJJURI, Venkateswararao (The Landmark, One MarketSuite 30, San Francisco California, 94105, US)
Application Number:
US2018/044976
Publication Date:
February 07, 2019
Filing Date:
August 02, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SALESFORCE.COM, INC. (The Landmark, One MarketSuite 30, San Francisco California, 94105, US)
International Classes:
G06F11/14
Foreign References:
EP0772126A21997-05-07
US7739677B12010-06-15
US8707082B12014-04-22
US9146790B12015-09-29
US6205510B12001-03-20
Other References:
None
Attorney, Agent or Firm:
SEEGERS, Mark D. (Meyertons, Hood Kivlin, Kowert & Goetzel, P.C.,P.O. BOX 39, Austin Texas, 78767-0398, US)
Download PDF:
Claims:
WHAT IS CLAIMED IS:

1. A method for a database system to fence out a first one of a plurality of nodes configured to handle requests for data of the database system stored in a distributed storage, the method comprising:

storing, in a metadata server of the database system, an identifier indicating that the first node is permitted to update a catalog of the database system stored at the metadata server, wherein the first node is configured to examine the identifier prior to updating the catalog;

in response to a determination to prevent the first node from updating the catalog and writing to the distributed storage:

updating, in the metadata server, the identifier to indicate that the first node is not permitted to update the catalog; and

instructing the distributed storage to prevent write operations to a particular portion allocated to the first node for writing data.

2. The method of claim 1, wherein the plurality of nodes are configured to execute a high availability (HA) application to implement an HA database cluster, wherein the method is performed by the HA application. 3. The method of claim 2, further comprising:

the HA application electing a second one of the plurality of nodes for writing data to the distributed storage; and

in response to electing the second node, the HA application causing the second node to maintain a copy of the identifier, wherein the second node is configured to compare the copy of the identifier and the identifier stored in the metadata server prior to updating the catalog.

4. The method of claim 2 or 3, further comprising:

the HA application making the determination to prevent the first node from writing to the distributed storage.

5. The method of any of claims 1 to 4, wherein the first node is configured to:

allocate a set of portions at the distributed storage for writing data;

in response to allocating the set of portions, attempt to update the catalog of the database system, including examining the identifier to determine whether the identifier has been updated; and

in response to determining that the identifier has been updated, cease allocating portions at the distributed storage.

6. The method of any of claims 1 to 4, wherein the first node is configured to:

allocate a set of portions at the distributed storage for writing data;

in response to allocating the set of portions, attempt to update the catalog of the database system, including examining the identifier to determine whether the identifier has been updated; and

in response to determining that the identifier has not been updated, update the catalog to include an indication of the set of allocated portions.

7. The method of claim 6, wherein a second one of the plurality of nodes is configured to: monitor the catalog of the database system to determine portions that have been allocated by the first node; and

in response to the first node updating the catalog, use the indication to read from the set of allocated portions for updating a cache maintained by the second node.

8. The method of any of claims 1 to 7, wherein the first node is configured to:

store an instance of the identifier stored by the metadata server; and

determine whether the identifier has been updated by comparing the stored instance of the identifier and the identifier stored by the metadata server.

9. The method of any of claims 1 to 8, wherein the distributed storage is configured to: maintain a plurality of flags for portions allocated at the distributed storage, wherein ones of the plurality of flags indicate whether a given portion may be written to by the first node; and in response to being instructed to prevent writes, set one of the plurality of flags that is associated with the particular portion to indicate that the particular portion cannot be written to.

10. The method of any of claims 1 to 4 and 7 to 9, wherein the first node is configured to:

for servicing a request from a client device, allocate a set of one or more portions at the distributed storage for writing data; and in response to determining that the identifier has not been updated, update data of the catalog to provide one or more indications of the set of one or more portions.

11. A database system, comprising:

a plurality of nodes configured to implement a database cluster;

a distributed storage accessible to the plurality of nodes and configured to store data of the database system; and

a metadata server configured to maintain an identifier indicating that an active one of the plurality of nodes is allowed to update a database catalog maintained by the metadata server; wherein the database system is configured to:

determine to prevent the active node from updating the database catalog and writing data to the distributed storage; and

in response to determining to prevent the active node:

modify, at the metadata server, the identifier to indicate that the active node is not allowed to update the database catalog; and

instruct the distributed storage to prevent write operations, from the active node, to a particular portion allocated for writing data.

12. The database system of claim 11, wherein the active node is configured to:

in response to determining that a stored instance of the identifier does not match the identifier maintained by the metadata server, discontinue updating the database catalog to indicate portions allocated by the active node.

13. The database system of claim 11, wherein the database system is configured to:

in response to determining to prevent the active node from updating the database catalog and writing data to the distributed storage:

select another active one of the plurality of nodes for writing data to the distributed storage; and

cause the other active node to store an instance of the modified identifier, wherein the instance is usable to determine whether the modified identifier has been subsequently modified.

14. The database system of claim 13, wherein the database system is configured to:

prior to causing the other active node to store the instance, modify the identifier by causing the other active node to modify the identifier, wherein the identifier is a numerical value.

15. A non-transitory computer-readable medium having program instructions stored thereon that are executable by one or more processors to implement a method according to any of claims 1 to 10.

16. A method, comprising:

storing, a first database node of a database system, an instance of an identifier maintained by the database system, wherein the identifier is set to indicate that the first database node is allowed to modify a catalog of the database system;

in response to receiving a first request to write data to a shared storage, the first database node:

allocating a first region of the shared storage for servicing the first request;

determining whether modification of the catalog is authorized by comparing the instance and the maintained identifier to determine whether the maintained identifier has been modified; and

based on the modification being authorized, updating the catalog to include an indication of the first region. 17. The method of claim 16, further comprising:

in response to receiving a second request to write data to the shared storage, the first database node:

allocating a second region of the shared storage;

comparing the instance and the maintained identifier to determine whether the maintained identifier has been modified; and

in response to determining that the maintained identifier has been modified, determining to not update the catalog to include an indication of the second region.

18. The method of claim 16, further comprising:

for servicing a second request, attempting to write data to the first region; and

in response to the attempting, determining that the database system has prevented the first database node from writing data to the first region, wherein the shared storage is configured to maintain an indication of whether a particular region is writable to by a database node of the database system.

19. The method of claim 16 or 18, wherein the database system is configured to select one of a plurality of database nodes of the database system for writing data to the shared storage, and wherein the operations further comprise:

in response to the database system selecting the first database node for writing data to the shared storage, the first database node:

modifying the identifier to indicate that the first database node is allowed to modify the catalog of the database system; and

performing the storing of the instance of the identifier maintained by the database system.

20. The method of claim 16 or 17, further comprising:

executing a high availability (HA) application to implement an HA database cluster, wherein the HA application is operable to:

monitor a heartbeat of the first database node to determine whether an issue has occurred at the first database node; and

in response to determining that an issue has occurred at the first database node, modify the identifier to indicate that the first database node is not allowed to modify the catalog and instruct the shared storage to prevent write operations to the first region.

21. The method of claim 16, further comprising:

in response to receiving a second request to write data to the shared storage, the first database node:

determining whether the first region has capacity for storing data associated with the second request; and

in response to determining that the first region has capacity, writing the data of the second request to first region, wherein the second request is received from a client device. 22. A non-transitory computer-readable medium having program instructions stored thereon that are executable by one or more processors to implement a method according to any of claims 16 to 21.

23. A database system, comprising:

a plurality of nodes configured to implement a database cluster; and

a shared storage accessible to the plurality of nodes and configured to store data of the database system,

wherein a first database node of the plurality of nodes is configured to implement a method according to any of claims 16 to 21.

Description:
FENCING OUT NODES IN A DISTRIBUTED CLUSTERED SYSTEM

BACKGROUND

Technical Field

[0001] This disclosure relates generally to high availability systems and, more specifically, to clustered database systems.

Description of the Related Art

[0002] When an organization wishes to store information for their users, the organization typically implements a database system that stores this information in an organized manner that may be efficiently accessed. Database systems for large enterprise systems may rely on multiple servers to implement a computer cluster, where individual servers act as cluster nodes running an instance of a database application. These nodes may individually service requests from users to operate on data. In order to ensure cluster reliability, a cluster may need to account for the scenario in which a node malfunctions.

BRIEF DESCRIPTION OF THE DRAWINGS

[0003] Fig. 1 is a block diagram illustrating exemplary elements of a database system that implements a database, according to some embodiments.

[0004] Fig. 2 is a block diagram illustrating exemplary elements of a metadata server that maintains an authorization identifier, according to some embodiments.

[0005] Fig. 3 is a block diagram illustrating exemplary elements of an active node that services requests for writing data to a distributed storage, according to some embodiments.

[0006] Fig. 4-6 are flow diagrams illustrating exemplary methods relating to fencing out a node, according to some embodiments.

[0007] Fig. 7 is a block diagram illustrating an exemplary computer system, according to some embodiments.

[0008] This disclosure includes references to "one embodiment" or "an embodiment." The appearances of the phrases "in one embodiment" or "in an embodiment" do not necessarily refer to the same embodiment. Particular features, structures, or characteristics may be combined in any suitable manner consistent with this disclosure.

[0009] Within this disclosure, different entities (which may variously be referred to as "units," "circuits," other components, etc.) may be described or claimed as "configured" to perform one or more tasks or operations. This formulation— [entity] configured to [perform one or more tasks]— is used herein to refer to structure (i.e., something physical, such as an electronic circuit). More specifically, this formulation is used to indicate that this structure is arranged to perform the one or more tasks during operation. A structure can be said to be "configured to" perform some task even if the structure is not currently being operated. A "node configured to execute an instance of a database management application" is intended to cover, for example, an integrated circuit that has circuitry that performs this function during operation, even if the integrated circuit in question is not currently being used (e.g., a power supply is not connected to it). Thus, an entity described or recited as "configured to" perform some task refers to something physical, such as a device, circuit, memory storing program instructions executable to implement the task, etc. This phrase is not used herein to refer to something intangible. Thus the "configured to" construct is not used herein to refer to a software entity such as an application programming interface (API).

[0010] The term "configured to" is not intended to mean "configurable to." An unprogrammed FPGA, for example, would not be considered to be "configured to" perform some specific function, although it may be "configurable to" perform that function and may be "configured to" perform the function after programming.

[0011] As used herein, the terms "first," "second," etc. are used as labels for nouns that they precede, and do not imply any type of ordering (e.g., spatial, temporal, logical, etc.) unless specifically stated. For example, in a database system having eight nodes, the terms "first" and "second" nodes can be used to refer to any two of the eight nodes.

[0012] As used herein, the term "based on" is used to describe one or more factors that affect a determination. This term does not foreclose the possibility that additional factors may affect a determination. That is, a determination may be solely based on specified factors or based on the specified factors as well as other, unspecified factors. Consider the phrase "determine A based on B ." This phrase specifies that B is a factor is used to determine A or that affects the determination of A. This phrase does not foreclose that the determination of A may also be based on some other factor, such as C. This phrase is also intended to cover an embodiment in which A is determined based solely on B. As used herein, the phrase "based on" is thus synonymous with the phrase "based at least in part on."

DETAILED DESCRIPTION

[0013] Since malfunctioning database nodes have the potential to corrupt data and/or interfere with database operation, it may be important to fence off (i.e., isolate) a problematic database node. One approach to isolating a malfunctioning node involves physically powering it down— referred to as the Shoot The Other Node In The Head (STONITH) approach. In this approach, the malfunctioning node is typically shutdown by flipping the power switch on the node either by hand or using a robotic control process. Such an approach, however, does not stop input/output that is currently being communicated on the "wire" or at the controller level. Another approach involves issuing a series of complex Small Computer System Interface (SCSI) commands to leverage functionality of the SCSI protocol— often referred to as SCSI Fencing. This approach, however, does not work well in distributed database systems as the complexity increases when data is shared across multiple discs and controllers.

[0014] The present disclosure describes techniques for fencing out database nodes in a way that overcomes the downsides of the prior approaches. In various embodiments described below, a database system fences out a database node by preventing it from 1) updating a catalog to indicate new database portions that have been allocated for writing data at a shared storage and from 2) writing to already allocated portions. To prevent the catalog from being updated, a metadata server of the database system may maintain an identifier that indicates whether a database node may update the catalog. As such, when a database node wishes to update the catalog, it may communicate with the metadata server to determine whether it has the authority to do so— this authority being based on the maintained identifier. In such an embodiment, if the database node is to be fenced off, the database system may update the identifier at the metadata server to indicate that the database node does not have the authority to update the catalog. To prevent the malfunctioning node from writing to the already allocated portions, the database system may instruct the shared storage storing the allocated portions to prevent any new writes to already allocated portions. This fencing approach may be advantageous over prior approaches as, for example, it does not rely on some external mechanism (e.g., an administrator) to power down the node and is less complex than a solution, for example, based on SCSI.

[0015] Turning now to Fig. 1, a block diagram of a database system 10 is depicted. In the illustrated embodiment, database system 10 includes a database cluster 100, a distributed storage 120, and a metadata server 130 coupled via a network 160. As shown, cluster 100 includes an active node 140 and standby nodes 150, each running a high availability (HA) cluster manager 110. Further as shown, distributed storage 120 includes allocated regions 122 and unallocated space 124, and metadata server 130 includes an authorization identifier 132 and a catalog 134. Although not shown, various client devices (e.g., application servers) may interact with nodes 140 and 150 by sending requests to perform database transactions. In some embodiments, database system 10 may be implemented differently than shown. For example, in some embodiments, database system 10 includes multiple active nodes 140. Storage 120 may also not be a distributed storage.

[0016] Database system 10, in various embodiments, is implemented in part via nodes 140 and 150, which are configured to operate as a database cluster 100 and process transaction requests 146 and 156. These requests may include reading and/or writing data to storage 120. For example, active node 140 may receive a request 146 to update a user's password to a new value and thus may write a record to an allocated region 122 where the record includes the value. In some embodiments, database system 10 implements an HA service using an active- standby topology in which one or more of the database nodes are elected for writing data to storage 120 on behalf of the other nodes— the elected node being shown as active node 140 and the non-elected nodes being shown as standby nodes 150.

[0017] Active node 140, in various embodiments, is configured to service requests to read and write data to distributed storage 120 (despite only write transaction request 146 being shown). Accordingly, active node 140 may receive a write transaction request 146 from a client device and issue a corresponding write record request 144 to write data to an allocated region 122 in storage 120. In some embodiments discussed below, allocated regions 122 are files created by node 140 from unallocated space 124 in storage 120 where records may be written and read. Active node 140 is discussed in greater detail below with respect to Fig. 3.

[0018] Standby nodes 150, in various embodiments, are configured to service read requests 156 to provide data stored in distributed storage 120 (and/or serve as backup nodes that are configured to take over the role of an active node 140 if warranted). In various embodiments, standby nodes 150 may each maintain metadata about the current state of database system 10. For example, a node 150 may maintain a local cache storing metadata that is also being stored by storage 120. In such an embodiment, standby nodes 150 may receive, from client devices, read transaction requests 156 for data stored in storage 120. In response to these requests, standby nodes 150 may retrieve the requested data from their local caches (as opposed to storage 120) if the data is already present in the cache. In order to ensure that their local caches are concurrent with the data in storage 120, in some embodiments, nodes 150 may consult catalog 134 to identify what new regions 122 have been allocated at storage 120 and subsequently, what records have been written. The records may be read from storage 120 to determine any modifications to data in storage 120 that might affect data in their local caches. If data in a local cache is affected (e.g., the value of a key -value pair has been updated or deleted), a standby node 150 may update the cache to reflect the modification of the data in storage 120 (e.g., by updating or invalidating a cache entry). This may allow standby nodes to maintain caches that are reflective of the current state of database system 10. As noted above, one of the standby nodes 150 may be elected to become active node 140— at which point, the node may service write transaction requests 146. Maintaining up-to-date metadata about the current state of system 10 may allow a newly elected node 150 to more quickly take on the role of an active node 140.

[0019] HA cluster manager 110, in various embodiments, is an application executable to manage cluster resources in order to achieve high availability for cluster 100 (or more generally database system 10). Accordingly, in some embodiments, manager 110 is executable to detect failures of nodes 140 and 150 and facilitate failovers. In particular, manager 110 may be distributed across nodes 140 and 150 such that it may monitor the health by monitoring for a heartbeat signal sent by each node 140 and 150 to indicate that the nodes 140 and 150 have not become unresponsive. If, for example, the current active node 140 is not responding with the heartbeat signal, manager 110 may facilitate a failover by holding an election to select a new active node 140 from standby nodes 150 and promoting the elected standby node 150 to become active node 140. In some embodiments, manager 110 may alternatively sent a request to each node 140 and 150 and wait for a corresponding response to ensure nodes 140 and 150 are still responsive. In some embodiments, manager 110 may also hold an election in response to a request from a user such as an administrator. (In some embodiments, elections may alternatively be conducted by metadata server 130 discussed below.)

[0020] As will be described in greater detail below, manager 110 may also be executable to fence out nodes 140 and 150 in response to a determination that a node is malfunctioning (or in response to a user request). (Although various fencing operations will be described below as being performed by manager 110, in some embodiments, these operations may be performed by an entity other than manager 110.) In various embodiments discussed below, manager 110 may fence out node 140 by preventing it from updating catalog 134 and from writing to allocated regions 122. This process is described in more detail below after briefly discussing storage 120 and metadata server 130.

[0021] Distributed storage 120, in various embodiments, is a shared storage configured to store data for users of system 10. In some embodiments, storage 120 may be implemented by multiple storage devices connected together on a network (e.g. a storage attached network (SAN)) and configured to redundantly store data in order to prevent data loss. In various embodiments, storage 120 is configured to implement a log-structured storage (e.g., a write-ahead log (WAL)) in which an active node 140 allocates a new region/portion 122 for storing new transaction data (as opposed to overwriting existing transaction data). For example, a particular region 122 may include an account balance of a user. In such an example, if a transaction request 146 is received to update the account balance, active node 140 may not modify the previously stored account balance in the particular region 122; rather, the active node 140 may submit a request 144 to write a new record identifying the new account balance in a newly allocated region 122 (or in the particular region 122). In some embodiments, an active node 140 may allocate a region 122 of unallocated space 124 by creating a file (or requesting that storage 120 create the file) for storing new transaction data. As transaction requests 146 are received, active node 140 may write new records to the file. When the file becomes full, an active node 140 may close the file/region 122 and allocate a new region 122 by creating another file for storing records. In some embodiments, an active node 140 may allocate multiple regions 122 at a given time to store transaction data— e.g., a block of ten regions 122. As will be discussed in greater detail, in various embodiments, active node 140 updates catalog 134 (via a request 142 shown in Fig. 1) when it allocates new regions 122 and closes out old ones, which are full of records. These updates may be reviewed by standby nodes 150 in order to become aware of newly allocated regions 122 and to read the contents of those regions 122. For example, nodes 150 may read the database records in a given region 122 so that they can update various locally maintained metadata (such as their local caches noted above) to reflect the current state of the database system. As will be described below, access to catalog 134 may be restricted when attempting to fence out an active node 140.

[0022] In various embodiments, storage 120 is configured to maintain metadata indicating whether allocated regions 122 are permitted to be written to by an active node 140. For example, in some embodiments, this metadata may include a write flag for each region 122 indicating whether the current active node 140 is allowed to write records to the associated allocated region 122 (or more generally whether any node in system 10 can modify a region 122). As will be discussed below, these write flags may be set by manager 110 in response to a determination that a node 140 is to be fenced out.

[0023] Metadata server 130, in various embodiments, is configured to maintain metadata usable by nodes 140 and 150 to implement database system 10. For example, as shown, server 130 may maintain a catalog 134 that may specify a schema defining various database structures and objects, indexes for looking up data in the database, user permissions for accessing database information, etc. As mentioned above, in some embodiments, catalog 134 stores metadata providing indications of allocated regions 122. This metadata may include location information (such as region 122 IDs, keys, etc.) that identifies physical locations in storage 120 where corresponding allocated regions 122 are located. In response to catalog 134 being modified, server 130 may notify nodes 150 that catalog 134 has changed. Accordingly, nodes 150 may then review catalog 134 and use the newly- added keys to locate the corresponding allocated regions 122; in various cases, nodes 150 may periodically review catalog 134 without being notified.

[0024] As noted above, active node 140 may be responsible for updating catalog 134 via a catalog update request 142 after allocating a region 122. Server 130, in various embodiments, maintains a value (shown as an authorization identifier 132) indicating whether the current active node 140 may update catalog 134. When active node 140 wants to update catalog 134, in various embodiments, it determines whether identifier 132 has been modified. If identifier 132 has not been modified, node 140 may proceed to update catalog 134. If, however, identifier 132 has been modified, node 140 may not update catalog 134 to reflect newly allocated regions 122.

[0025] As noted above, in various embodiments, HA cluster manager 110 may determine at some point that fencing out active node 140 is warranted because, for example, a heartbeat signal is no longer being received, a user has requested it, etc. In response to making such a determination, manager 110 may seek to prevent the active node 140 from writing possibly corrupt records and from allocating additional regions 122 for writing more possibly corrupt records. In order to prevent node 140 from updating catalog 134, in various embodiments, manager 110 issues a request (shown as a modify identifier request 112) for metadata server 130 to modify authorization identifier 132. In some embodiments, this request 112 may come from a newly elected standby node 150 executing an instance of manager 110. As discussed above, in such an embodiment, once identifier 132 has been modified, active node 140 is not permitted to update catalog 134. Catalog update request 142 is thus depicted with an "X" in Fig. 1 to indicate that active node 140 has been prevented from updating catalog 134. In some embodiments, active node 140 is configured to discontinue allocating new regions 122 if it is unable to update catalog 134 to reflect already allocated regions 122— thus, node 140 is effectively barred from allocating new regions 122 to store new records in response to authorization identifier 132 being modified.

[0026] In order to prevent node 140 from writing to regions 122 that have already been allocated, in the illustrated embodiment, manager 110 issues a block write request 114 to storage 120. This request may instruct storage 120 to prevent write operations to a specified set of allocated regions 122 and, in some embodiments, be issued by the newly elected node 150. In response to receiving request 114, storage 120 may set the write flags associated with the specified set of regions 122 to prevent active node 140 from writing records to them. Afterwards, when node 140 issues a write record request 144 to storage 120, in some embodiments, storage 120 determine, from the flags, to reject the request 144 and not add another record to already allocated region 122. Write record request 144 thus is depicted with an "X" in Fig. 1 to indicate that node 140 has been prevented from writing records to specific regions 122.) In blocking catalog update request 142 and write record requests 144, manager 110 effectively fences out active node 140, preventing it from potentially corrupting data in database system 10.

[0027] Turning now to Fig. 2, a block diagram of one embodiment of metadata server 130 is shown. As mentioned above, in various embodiments, server 130 is configured to store metadata usable by nodes 140 and 150 to implement database system 10. In the illustrated embodiment, server 130 includes an authorization identifier 132 and a catalog 134. Further as shown, catalog 134 includes allocated region metadata 210. In various embodiments, metadata server 130 may be implemented differently than shown.

[0028] As noted above, catalog 134, in various embodiments, includes metadata 210 usable by nodes 140 and 150 to locate regions 122 in storage 120. In some embodiments, metadata 210 may include keys that map to physical locations in storage 120 where corresponding allocated regions 122 are stored. In response to allocating a region 122 at storage 120 (e.g., opening a file for storing records), node 140 may attempt to update catalog 134 to include keys for the allocated regions 122. Catalog 134 may then be updated again once a node 140 has filled a region 122 with records (e.g., and is closing the file). Accordingly, nodes 150 that wish to read written records may first consult catalog 134 by requesting keys from server 130. Nodes 150 may then issue the keys to storage 120, which may implement a key -value store that returns the written records in response to receiving the keys. In some embodiments, metadata 210 further includes additional metadata, which may be used by a standby node 150 in becoming the active node 140 such as an append point specifying a particular region 122 where the next record may be written, a tail marker specifying the oldest region 122, time stamps for each region 122, etc.

[0029] As noted above, in various embodiments, authorization identifier 132, is a value that indicates whether the current active node 140 may update catalog 134. In some embodiments, identifier 132 explicitly identifies the active node 140. For example, identifier 132 may be an IP address of the node 140, a unique node identifier, etc. In other embodiments, as will be discussed with Fig. 3, identifier 132 does not explicitly identify a node 140; rather, identifier 132 is a sequence of alpha and/or numeric characters that is set upon a node becoming the current active node 140 and remains unaltered as long as the node is still the active node 140. Accordingly, in such an embodiment, identifier 132 is updated only when manager 110 elects a new active node 140. [0030] Turning now to Fig. 3, a block diagram of one embodiment of an active node 140 is shown. In the illustrated embodiment, active node 140 includes an instance of HA cluster manager 110, a database application 310, and an authorization identifier copy 320. In various embodiments, active node 140 may be implemented differently than shown. For example, HA cluster manager 110 and database application 310 a part of the same application.

[0031] Database application 310, in various embodiments, is an application executable by node 140 to service requests 146 and 156 from clients including the writing and reading of records from regions 122. In some embodiments, application 310 is also executable to update catalog 134 with metadata 210 about regions 122 at storage 120. After allocating one or more regions 122 or closing them, application 310 may attempt to update catalog 134 by first reviewing identifier 132 to determine whether it has changed. In an embodiment in which identifier 132 explicitly identifies node 140 (e.g., by specifying an IP address, node ID, etc.), application 310 may retrieve identifier 132 via an authorization identifier request 315 and confirm that the identifier 132 still indicates that its node is the active one. In an embodiment in which identifier 132 does not explicitly point to node 140 (e.g., it is a generic string of characters), the node, upon being the active node 140, requests and stores a local copy of identifier 132— shown as copy 320. When node 140 later attempts to update catalog 134, node 140 may compare its copy 320 with a copy of identifier 132 in metadata server 130 in order to confirm that identifier 132 has not been modified since it became the active node 140. If identifier 132 has not been modified, then active node 140 updates catalog 134; otherwise, node 140 does not update the catalog 134— and thus does not allocate any additional regions 122.

[0032] Turning now to Fig. 4, a flow diagram of a method 400 is shown. Method 400 is one embodiment of a method performed by a computer system (e.g., database system 10) to fence-out a database node (e.g., node 140). In various embodiments, nodes (e.g., nodes 140 and 150) of the computer system execute a high availability (HA) application (e.g., HA cluster manager 110) that implements a HA database cluster and performs the steps of method 400. In some embodiments, method 400 includes additional steps such as reading from portions (e.g., regions 122) allocated at a distributed storage (e.g., storage 120).

[0033] Method 400 begins in step 410 with the computer system storing, in a metadata server (e.g., server 130), a value (e.g., identifier 132) indicating that a first node (e.g., node 140) is permitted to update a catalog (e.g., catalog 134) stored at the metadata server of the database system. The first node may examine the value prior to updating the catalog. As an example, in one embodiment, the first node allocates a set of portions at the distributed storage for writing data and in response to doing so, attempts to update the catalog with metadata about the allocated set of portions. The first node may do so by first examining the value stored in the metadata server to determine whether it has been updated. In various cases, the first node may determine that the value has not been updated and as a result, update the catalog to include indications of the allocated portions. In other embodiments, the first node determines that the value has been updated and ceases allocating portions at the distributed storage. In various embodiments, the value is stored at the distributed storage instead of the metadata server.

[0034] In response to a determination to prevent the first node from updating the catalog and writing to the distributed storage, in step 420, the computer system updates the value stored at the metadata server to indicate that the first node is not permitted to update the catalog. This determination may result from a request from a user or through an automation process. In various instances, the HA application may make this determination. In some embodiments, the HA application elects a second node (e.g., node 140) for writing data to the distributed storage and causes the elected node to update the value and store a copy of it (e.g., authorization identifier copy 320).

[0035] In step 430, the computer system instructs the distributed storage to prevent write operations to a particular portion allocated to the database node for writing data. In some embodiments, the distributed storage stores a write flag for each allocated portion and in response to being instructed, sets the write flag of the particular portion to indicate that nodes of the computer system cannot write data to the particular portion.

[0036] Turning now to Fig. 5, a flow diagram of a method 500 is shown. Method 500 is one embodiment of a method performed by a database system (e.g., system 10) to fence-out an active node (e.g., node 140). As with method 400, the steps of method 500 may be performed by an HA application (e.g., manager 110) distributed across the nodes (e.g., nodes 140 and 150) of the database system. In various embodiments, method 500 includes additional steps— e.g., a standby node (e.g., node 150) monitoring a catalog (e.g., catalog 134) to determine whether any new portions (e.g., regions 122) have been allocated by the active node.

[0037] Method 500 begins in step 510 with the database system determining to prevent an active node from updating the catalog and writing data to a distributed storage (e.g., storage 120). In response to determining to prevent the active node, in various embodiments, the database system elects a new active node for writing data to the distributed storage. The determination may be made in response to receiving a request from a client system. [0038] In response to determining to prevent the active node from updating the catalog, in step 520, the database system modifies an identifier (e.g., 132) to indicate that the active node is not allowed to update the catalog. In various embodiments, a metadata server (e.g., server 130) maintains the identifier. The active node may store an instance of the identifier (e.g., copy 320) and use the instance to determine whether the identifier has been modified prior to updating the catalog. In various embodiments, the active node makes this determination by comparing the stored instance with the identifier maintained at the metadata server. In some embodiments, the active node discontinues updating the catalog to indicate portions allocated by the active node in response to determining that the stored instance does not match the identifier. In some embodiments, the database system causes the newly elected node to modify the identifier and to store an instance of the modified identifier to determine whether the modified identifier has been subsequently modified. In various embodiments, the identifier maintained by the metadata server is a numerical value.

[0039] In step 530, in response to determining to prevent the active node from writing data to the distributed storage, the database system instructs the distributed storage to prevent write operations, from the active node, to a particular portion allocated for writing data. In various embodiments, the distributed storage maintains write flags for portions allocated at the distributed storage. These flags may indicate whether a given portion may be written to by the active node. In response to being instructed to prevent writes by the database system, the distributed storage may set a flag that is associated with the particular portion to indicate that the particular portion cannot be written to by the active node.

[0040] Turning now to Fig. 6, a flow diagram of a method 600 is shown. Method 600 is one embodiment of a method performed by a database node (e.g., node 140) to allocate a region (e.g., region 122) of a shared storage (e.g., storage 120) and update a catalog (e.g., catalog 134) to indicate the allocated region. The steps of method 600 may be performed in response to receiving a request to service a transaction request (e.g., request 146) for writing data to the shared storage. In various embodiments, method 600 includes additional steps— e.g., determining whether an allocated region has capacity for storing additional data, determining that an issue has occurred with a database node, etc.

[0041] Method 600 begins in step 610 with a database node storing an instance (e.g., copy 320) of an identifier (e.g., 132) maintained by the database system (e.g., system 10) of the database node. In various embodiments, the identifier is set to indicate that the database node is allowed to modify a catalog of the database system. Initially, the database system may select the database node from multiple database nodes for writing data to the shared storage. In response to being selected for writing data, the database node may modify the identifier to indicate that the newly elected database node is allowed to modify the catalog. Thereafter, in various embodiments, the database node performs step 610.

[0042] In response to receiving a request to write data to the shared storage, in step 620, the database node allocates a region of the shared storage for servicing the request. In some embodiments, the database node attempts to write data to the region and determines that the database system has prevented the database node from writing data to the region. In various embodiments, the shared storage maintains an indication of whether a particular region may be written to by a database node (e.g., node 140).

[0043] In step 630, the database node determines whether modification of the catalog is authorized by comparing the instance and the maintained identifier to determine whether the maintained identifier has been modified. The database node may execute a high availability (HA) application (e.g., manager 110) to implement an HA database cluster. In some embodiments, the HA application monitors a heartbeat of the database node to determine whether an issue has occurred at the database node. In response to determining that an issue has occurred at the database node, the HA application may modify the identifier to indicate that the database node is not allowed to modify the catalog and may instruct the shared storage to prevent write operations to the allocated region. In some embodiments, the HA application elects the other database node for writing data to the shared storage and the other node modifies the identifier and instructs the shared storage.

[0044] Based on the modification being authorized, in step 640, the database node updates the catalog to include an indication of the allocated region. In some embodiments, based on determining that the maintained identifier has been modified to indicate that the database node is not allowed to modify the catalog, the database node may cease updating the catalog to include the indication of the allocated region. In some cases, the catalog not including an indication of the allocated region causes other nodes (e.g., 150) to be unaware of the allocated region.

Exemplary Computer System

[0045] Turning now to Fig. 7, a block diagram of an exemplary computer system 700, which may implement database system 10, is depicted. Computer system 700 includes a processor subsystem 780 that is coupled to a system memory 720 and I/O interfaces(s) 740 via an interconnect 760 (e.g., a system bus). I/O interface(s) 740 is coupled to one or more I/O devices 750. Computer system 700 may be any of various types of devices, including, but not limited to, a server system, personal computer system, desktop computer, laptop or notebook computer, mainframe computer system, tablet computer, handheld computer, workstation, network computer, a consumer device such as a mobile phone, music player, or personal data assistant (PDA). Although a single computer system 700 is shown in Figure 7 for convenience, system 700 may also be implemented as two or more computer systems operating together.

[0046] Processor subsystem 780 may include one or more processors or processing units. In various embodiments of computer system 700, multiple instances of processor subsystem 780 may be coupled to interconnect 760. In various embodiments, processor subsystem 780 (or each processor unit within 780) may contain a cache or other form of on-board memory.

[0047] System memory 720 is usable store program instructions executable by processor subsystem 780 to cause system 700 perform various operations described herein. System memory 720 may be implemented using different physical memory media, such as hard disk storage, floppy disk storage, removable disk storage, flash memory, random access memory (RAM— SRAM, EDO RAM, SDRAM, DDR SDRAM, RAMBUS RAM, etc.), read only memory (PROM, EEPROM, etc.), and so on. Memory in computer system 700 is not limited to primary storage such as memory 720. Rather, computer system 700 may also include other forms of storage such as cache memory in processor subsystem 780 and secondary storage on I/O Devices 750 (e.g., a hard drive, storage array, etc.). In some embodiments, these other forms of storage may also store program instructions executable by processor subsystem 780. In some embodiments, manager 110 described above may include (or be included within) system memory 720.

[0048] I/O interfaces 740 may be any of various types of interfaces configured to couple to and communicate with other devices, according to various embodiments. In one embodiment, I/O interface 740 is a bridge chip (e.g., Southbridge) from a front-side to one or more back-side buses. I/O interfaces 740 may be coupled to one or more I/O devices 750 via one or more corresponding buses or other interfaces. Examples of I/O devices 750 include storage devices (hard drive, optical drive, removable flash drive, storage array, SAN, or their associated controller), network interface devices (e.g., to a local or wide-area network), or other devices (e.g., graphics, user interface devices, etc.). In one embodiment, computer system 700 is coupled to a network via a network interface device 750 (e.g., configured to communicate over WiFi, Bluetooth, Ethernet, etc.).

[0049] Realizations of the subject matter of the application include, but are not limited to, the following examples 1 to 20.

1. A method for a database system to fence out a first one of a plurality of nodes configured to handle requests for data of the database system stored in a distributed storage, the method comprising: storing, in a metadata server of the database system, a value indicating that the first node is permitted to update a catalog of the database system stored at the metadata server, wherein the first node is configured to examine the value prior to updating the catalog;

in response to a determination to prevent the first node from updating the catalog and writing to the distributed storage:

updating, in the metadata server, the value to indicate that the first node is not permitted to update the catalog; and

instructing the distributed storage to prevent write operations to a particular portion allocated to the first node for writing data.

2. The method of example 1, wherein the plurality of nodes are configured to execute a high availability (HA) application to implement an HA database cluster, wherein the method is performed by the HA application.

3. The method of example 2, further comprising:

the HA application electing a second one of the plurality of nodes for writing data to the distributed storage; and

in response to electing the second node, the HA application causing the second node to maintain a copy of the value, wherein the second node is configured to compare the copy of the value and the value stored in the metadata server prior to updating the catalog.

4. The method of example 2, further comprising:

the HA application making the determination to prevent the first node from writing to the distributed storage.

5. The method of example 1, wherein the first node is configured to:

allocate a set of portions at the distributed storage for writing data;

in response to allocating the set of portions, attempt to update the catalog of the database system, including examining the value to determine whether the value has been updated; and in response to determining that the value has been updated, cease allocating portions at the distributed storage.

6. The method of example 1, wherein the first node is configured to:

allocate a set of portions at the distributed storage for writing data;

in response to allocating the set of portions, attempt to update the catalog of the database system, including examining the value to determine whether the value has been updated; and in response to determining that the value has not been updated, update the catalog to include an indication of the set of allocated portions. 7. The method of example 6, wherein a second one of the plurality of nodes is configured to: monitor the catalog of the database system to determine portions that have been allocated by the first node; and

in response to the first node updating the catalog, use the indication to read from the set of allocated portions for updating a cache maintained by the second node.

8. A database system, comprising:

a plurality of nodes configured to implement a database cluster;

a distributed storage accessible to the plurality of nodes and configured to store data of the database system; and

a metadata server configured to maintain an identifier indicating that an active one of the plurality of nodes is allowed to update a database catalog maintained by the metadata server; wherein the database system is configured to:

determine to prevent the active node from updating the database catalog and writing data to the distributed storage; and

in response to determining to prevent the active node:

modify, at the metadata server, the identifier to indicate that the active node is not allowed to update the database catalog; and

instruct the distributed storage to prevent write operations, from the active node, to a particular portion allocated for writing data.

9. The database system of example 8, wherein the active node is configured to:

store an instance of the identifier maintained by the metadata server; and

determine whether the identifier has been modified by comparing the stored instance of the identifier and the identifier maintained by the metadata server.

10. The database system of example 9, wherein the active node is configured to:

in response to determining that the stored instance does not match the identifier, discontinue updating the database catalog to indicate portions allocated by the active node.

11. The database system of example 8, wherein the distributed storage is configured to:

maintain a plurality of flags for portions allocated at the distributed storage, wherein ones of the plurality of flags indicates whether a given portion may be written to by the active node; and

in response to being instructed to prevent writes, set one of the plurality of flags that is associated with the particular portion to indicate that the particular portion cannot be written to.

12. The database system of example 8, wherein the active node is configured to: for servicing a request from a client device, allocate a set of one or more portions at the distributed storage for writing data; and

in response to determining that the identifier has not been modified, update data of the database catalog to provide one or more indications of the set of one or more portions.

13. The database system of example 8, wherein the database system is configured to:

in response to determining to prevent the active node from updating the database catalog and writing data to the distributed storage:

select another active one of the plurality of nodes for writing data to the distributed storage; and

cause the other active node to store an instance of the modified identifier, wherein the instance is usable to determine whether the modified identifier has been subsequently modified.

14. The database system of example 13, wherein the database system is configured to:

prior to causing the other active node to store the instance, modify the identifier by causing the other active node to modify the identifier, wherein the identifier is a numerical value.

15. A non-transitory, computer-readable medium having program instructions stored thereon that are capable of causing a first database node of a database system to perform operations comprising:

storing an instance of an identifier maintained by the database system, wherein the identifier is set to indicate that the first database node is allowed to modify a catalog of the database system;

in response to receiving a first request to write data to a shared storage:

allocating a first region of the shared storage for servicing the first request;

determining whether modification of the catalog is authorized by comparing the instance and the maintained identifier to determine whether the maintained identifier has been modified; and

based on the modification being authorized, updating the catalog to include an indication of the first region.

16. The non-transitory, computer-readable medium of example 15, wherein the operations further comprise:

in response to receiving a second request to write data to the shared storage:

allocating a second region of the shared storage;

comparing the instance and the maintained identifier to determine whether the maintained identifier has been modified; and in response to determining that the maintained identifier has been modified, determining to not update the catalog to include an indication of the second region.

17. The non-transitory, computer-readable medium of example 15, wherein the operations further comprise:

for servicing a second request, attempting to write data to the first region; and

in response to the attempting, determining that the database system has prevented the first database node from writing data to the first region, wherein the shared storage is configured to maintain an indication of whether a particular region is writable to by a database node of the database system.

18. The non-transitory, computer-readable medium of example 15, wherein the database system is configured to select one of a plurality of database nodes of the database system for writing data to the shared storage, and wherein the operations further comprise:

in response to the database system selecting the first database node for writing data to the shared storage:

modifying the identifier to indicate that the first database node is allowed to modify the catalog of the database system; and

performing the storing of the instance of the identifier maintained by the database system.

19. The non-transitory, computer-readable medium of example 15, wherein the operations further comprise:

executing a high availability (HA) application to implement an HA database cluster, wherein the HA application is operable to:

monitor a heartbeat of the first database node to determine whether an issue has occurred at the first database node; and

in response to determining that an issue has occurred at the first database node, modify the identifier to indicate that the first database node is not allowed to modify the catalog and instruct the shared storage to prevent write operations to the first region.

20. The non-transitory, computer-readable medium of example 15, wherein the operations further comprise:

in response to receiving a second request to write data to the shared storage:

determining whether the first region has capacity for storing data associated with the second request; and in response to determining that the first region has capacity, writing the data of the second request to first region, wherein the second request is received from a client device.

***

[0050] Although specific embodiments have been described above, these embodiments are not intended to limit the scope of the present disclosure, even where only a single embodiment is described with respect to a particular feature. Examples of features provided in the disclosure are intended to be illustrative rather than restrictive unless stated otherwise. The above description is intended to cover such alternatives, modifications, and equivalents as would be apparent to a person skilled in the art having the benefit of this disclosure.

[0051] The scope of the present disclosure includes any feature or combination of features disclosed herein (either explicitly or implicitly), or any generalization thereof, whether or not it mitigates any or all of the problems addressed herein. Accordingly, new claims may be formulated during prosecution of this application (or an application claiming priority thereto) to any such combination of features. In particular, with reference to the appended claims, features from dependent claims may be combined with those of the independent claims and features from respective independent claims may be combined in any appropriate manner and not merely in the specific combinations enumerated in the appended claims.