kv_config_add_read_zone()

#include <kvstore.h>

kv_error_t 
kv_config_add_read_zone(kv_config_t *config, 
                        const char *read_zone); 

Adds a read zone. All nodes that are to be used for read operations must be located in the read zone. Before you call this function to create the read zone, then all read operations can be performed on nodes in any zone.

The specified read zone must exist at the time that this configuration is used to open a store handle, or KV_INVALID_ARGUMENT is returned when you attempt to open the handle.

Zones specified for read operations can include primary and secondary zones. If the master is not located in any of the specified zones, either because the zones are all secondary zones or because the master node is not currently in one of the specified primary zones, then read operations configured for absolute consistency will fail.

Parameters

  • config

    The config parameter points to the configuration structure for which you want to set the read zone.

  • read_zone

    The read_zone parameter is the name of the zone used to service read requests.