This blog is authored by Sruthi Anumula
In Eon Mode, there are two major requirements for high availability: maintaining quorum and shard coverage. If either of them is lost, the whole cluster goes down. Before going into details, let us understand what quorum and shard coverage mean.
Quorum: In Eon Mode, more than half of the primary nodes in the cluster must be up for the database to be up and running. When this criteria is met, your database has a quorum of nodes.
Shard Coverage: In Eon Mode, shard is a subset of data, and nodes subscribe to one or more shards. When a subcluster has at least one node subscribed to each shard, it has shard coverage.
In general, when the database goes down, you cannot query the database. However, from Vertica version 11.0.2 onwards, when either quorum or shard coverage is lost, the database still stays up in read-only mode and is available for querying. In this mode, you cannot commit or execute DMLs that change the global catalog.
The following operations are allowed when the database is up in read-only mode:
- SELECT queries
- Creating local temp tables
- Loading data into local and global temp table (provided this was created prior to loosing shard coverage)
You can connect to secondary subclusters and run reporting queries without disrupting business operations. With the help of this functionality, the Vertica database offers end users high availability even if one or more nodes in the primary subcluster are offline. The read-only mode of the data prevents data corruption thereby ensuring data integrity. Another reason to move to EON!!!
How To Monitor Read-Only Mode:
DBA’s can quickly check if the database is in read-only mode using the following queries:
You can query the Nodes system table to see if is_readonly is set to true. If it is set to true, it means that Vertica has lost shard coverage.
select node_name, node_state, is_readonly from nodes order by node_name;
You can query the active_events system table to see if Cluster Read-only events are being logged:
SELECT * FROM ACTIVE_EVENTS WHERE event_code = 20;