Motr  M0
m0_cas_rec Struct Reference

#include <cas.h>

Collaboration diagram for m0_cas_rec:
Collaboration graph

Data Fields

struct m0_rpc_at_buf cr_key
 
struct m0_rpc_at_buf cr_val
 
struct m0_cas_kv_vec cr_kv_bufs
 
struct m0_cas_hint cr_hint
 
uint64_t cr_rc
 
struct m0_crv cr_ver
 

Detailed Description

CAS index record.

Definition at line 164 of file cas.h.

Field Documentation

◆ cr_hint

struct m0_cas_hint cr_hint

Optional hint to speed up access.

Definition at line 200 of file cas.h.

◆ cr_key

struct m0_rpc_at_buf cr_key

Record key.

Should be filled for GET, DEL, PUT, CUR requests. It's empty in replies for GET, DEL, PUT requests and non-empty for CUR reply.

Definition at line 172 of file cas.h.

◆ cr_kv_bufs

struct m0_cas_kv_vec cr_kv_bufs

Vector of AT buffers to request key/value buffers in CUR request.

CUR request only specifies the starting key in cr_key. If several keys/values from reply should be transferred via bulk, then request should have descriptors for them => vector is required.

For now, vector size is either 0 (inline transmission is requested for all records) or equals to cr_rc (individual AT transmission method for every key/value).

Definition at line 195 of file cas.h.

◆ cr_rc

uint64_t cr_rc

In GET, DEL, PUT replies, return code for the operation on this record. In CUR request, the number of consecutive records to return.

In CUR reply, the consecutive number of the record for the current key. For example, if there are two records in CUR request requesting 2 and 3 next records respectively, then cr_rc values in reply records will be: 1,2,1,2,3.

Also, CAS service stops iteration for the current CAS-CUR key on error and proceed with the next key in the input vector. Suppose there is a CUR request, requesting 10 records starting from K0 and 10 records starting with K1. Suppose iteration failed on the fifth record after K0 and all K1 records were processed successfully. In this case, the reply would contain at least 15 records. First 5 will be for K0, the last of which would contain errno, the next 10 records will be for K1. Current implementation will add final 5 zeroed records.

Definition at line 221 of file cas.h.

◆ cr_val

struct m0_rpc_at_buf cr_val

Record value.

Should be empty for GET, DEL, CUR requests. For PUT request it should be empty if record is inserted in meta-index and filled otherwise. If operation is successful then replies for non-meta GET, CUR have this field set.

Definition at line 182 of file cas.h.

◆ cr_ver

struct m0_crv cr_ver

Optional version of this record. The version is returned as a reply to GET and NEXT requests when COF_VERSIONED is specified in the request.

Definition at line 228 of file cas.h.


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