Loading...
Searching...
No Matches
Data Fields | Related Symbols
as_policy_batch Struct Reference

Detailed Description

Batch parent policy.

Definition at line 909 of file as_policy.h.

#include "as_policy.h"

+ Collaboration diagram for as_policy_batch:

Data Fields

bool allow_inline
 
bool allow_inline_ssd
 
as_policy_base base
 
bool concurrent
 
bool deserialize
 
as_policy_read_mode_ap read_mode_ap
 
as_policy_read_mode_sc read_mode_sc
 
int read_touch_ttl_percent
 
as_policy_replica replica
 
bool respond_all_keys
 
bool send_set_name
 

Related Symbols

(Note that these are not member symbols.)

static void as_policy_batch_copy (const as_policy_batch *src, as_policy_batch *trg)
 
static as_policy_batchas_policy_batch_init (as_policy_batch *p)
 
static as_policy_batchas_policy_batch_parent_write_init (as_policy_batch *p)
 

Friends And Related Symbol Documentation

◆ as_policy_batch_copy()

static void as_policy_batch_copy ( const as_policy_batch * src,
as_policy_batch * trg )
related

Shallow copy as_policy_batch values.

Parameters
srcThe source policy.
trgThe target policy.

Definition at line 1803 of file as_policy.h.

◆ as_policy_batch_init()

static as_policy_batch * as_policy_batch_init ( as_policy_batch * p)
related

◆ as_policy_batch_parent_write_init()

static as_policy_batch * as_policy_batch_parent_write_init ( as_policy_batch * p)
related

Initialize as_policy_batch to default values when writes may occur.

Parameters
pThe policy to initialize.
Returns
The initialized policy.

Definition at line 1787 of file as_policy.h.

References base, and as_policy_base::max_retries.

Field Documentation

◆ allow_inline

bool as_policy_batch::allow_inline

Allow batch to be processed immediately in the server's receiving thread for in-memory namespaces. If false, the batch will always be processed in separate service threads.

For batch transactions with smaller sized records (<= 1K per record), inline processing will be significantly faster on in-memory namespaces.

Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.

Default: true

Definition at line 986 of file as_policy.h.

◆ allow_inline_ssd

bool as_policy_batch::allow_inline_ssd

Allow batch to be processed immediately in the server's receiving thread for SSD namespaces. If false, the batch will always be processed in separate service threads. Server versions < 6.0 ignore this field.

Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.

Default: false

Definition at line 998 of file as_policy.h.

◆ base

as_policy_base as_policy_batch::base

Generic policy fields.

Definition at line 914 of file as_policy.h.

◆ concurrent

bool as_policy_batch::concurrent

Determine if batch commands to each server are run in parallel threads.

Values:

  • false: Issue batch commands sequentially. This mode has a performance advantage for small to medium sized batch sizes because commands can be issued in the main transaction thread. This is the default.
  • true: Issue batch commands in parallel threads. This mode has a performance advantage for large batch sizes because each node can process the command immediately. The downside is extra threads will need to be created (or taken from a thread pool).

Definition at line 972 of file as_policy.h.

◆ deserialize

bool as_policy_batch::deserialize

Should raw bytes be deserialized to as_list or as_map. Set to false for backup programs that just need access to raw bytes.

Default: true

Definition at line 1040 of file as_policy.h.

◆ read_mode_ap

as_policy_read_mode_ap as_policy_batch::read_mode_ap

Read policy for AP (availability) namespaces. Default: AS_POLICY_READ_MODE_AP_ONE

Definition at line 925 of file as_policy.h.

◆ read_mode_sc

as_policy_read_mode_sc as_policy_batch::read_mode_sc

Read policy for SC (strong consistency) namespaces. Default: AS_POLICY_READ_MODE_SC_SESSION

Definition at line 931 of file as_policy.h.

◆ read_touch_ttl_percent

int as_policy_batch::read_touch_ttl_percent

Determine how record TTL (time to live) is affected on reads. When enabled, the server can efficiently operate as a read-based LRU cache where the least recently used records are expired. The value is expressed as a percentage of the TTL sent on the most recent write such that a read within this interval of the record’s end of life will generate a touch.

For example, if the most recent write had a TTL of 10 hours and read_touch_ttl_percent is set to 80, the next read within 8 hours of the record's end of life (equivalent to 2 hours after the most recent write) will result in a touch, resetting the TTL to another 10 hours.

Values:

  • 0 : Use server config default-read-touch-ttl-pct for the record's namespace/set.
  • -1 : Do not reset record TTL on reads.
  • 1 - 100 : Reset record TTL on reads when within this percentage of the most recent write TTL.

Default: 0

Definition at line 952 of file as_policy.h.

◆ replica

as_policy_replica as_policy_batch::replica

Algorithm used to determine target node.

Definition at line 919 of file as_policy.h.

◆ respond_all_keys

bool as_policy_batch::respond_all_keys

Should all batch keys be attempted regardless of errors. This field is used on both the client and server. The client handles node specific errors and the server handles key specific errors.

If true, every batch key is attempted regardless of previous key specific errors. Node specific errors such as timeouts stop keys to that node, but keys directed at other nodes will continue to be processed.

If false, the server will stop the batch to its node on most key specific errors. The exceptions are AEROSPIKE_ERR_RECORD_NOT_FOUND and AEROSPIKE_FILTERED_OUT which never stop the batch. The client will stop the entire batch on node specific errors for sync commands that are run in sequence (concurrent == false). The client will not stop the entire batch for async commands or sync commands run in parallel.

Server versions < 6.0 do not support this field and treat this value as false for key specific errors.

Default: true

Definition at line 1020 of file as_policy.h.

◆ send_set_name

bool as_policy_batch::send_set_name

This method is deprecated and will eventually be removed. The set name is now always sent for every distinct namespace/set in the batch.

Send set name field to server for every key in the batch for batch index protocol. This is necessary for batch writes and batch reads when authentication is enabled and security roles are defined on a per set basis.

Deprecated
Set name always sent.

Definition at line 1032 of file as_policy.h.


The documentation for this struct was generated from the following file: