Skip to main content

ec_adaptive_persist_configurations

Last updated March 2020

Name

ec_adaptive_persist_configurations — function to save suspensions, and optvals for a binding/domain to backstore

Synopsis

#include "modules/generic/adaptive_replicate.h"

| int **ec_adaptive_persist_configurations** ( | spaths, |   | |   | prefd, |   | |   | nodename, |   | |   | bdr, |   | |   | ages, |   | |   | ages_lock, |   | |   | suspensions, |   | |   | suspensions_lock, |   | |   | optvals, |   | |   | optvals_lock, |   | |   | err_buf, |   | |   | buf_len); |   |

const char ** <var class="pdparam">spaths</var>; int * <var class="pdparam">prefd</var>; const char * <var class="pdparam">nodename</var>; ec_adaptive_bdr * <var class="pdparam">bdr</var>; ec_hash_table * <var class="pdparam">ages</var>; pthread_rwlock_t * <var class="pdparam">ages_lock</var>; ec_hash_table * <var class="pdparam">suspensions</var>; pthread_rwlock_t * <var class="pdparam">suspensions_lock</var>; ec_hash_table * <var class="pdparam">optvals</var>; pthread_rwlock_t * <var class="pdparam">optvals_lock</var>; char * <var class="pdparam">err_buf</var>; size_t <var class="pdparam">buf_len</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

function to save suspensions, and optvals for a binding/domain to backstore.

before calling this function, the two hash tables should be locked. To increase the availability, function takes in a list of server paths. If prefd is provided, the list will be attempted starting from the passed in prefd till a success. The "good" server is indicated by the index passed out through prefd.

Parameters

spaths
  • backstore server paths
prefd
  • the prefd server index
nodename
  • the node name
bdr
  • binding/domain record
suspensions
  • hash table for suspensions
suspensions_loc
  • lock for suspensions table
optvals
  • hash table for binding ages
optvals_lock
  • lock for options table
err_buf
  • if provided, error message will be written to it.
err_len
  • the size of error buffer.

Return Values

1 - successful; 0 - failure

**Configuration Change. ** This feature is available starting from Momentum 3.3.

Was this page helpful?