Aerospike.PartitionFilter (Aerospike Driver v0.3.1)

Copy Markdown View Source

Describes which partitions participate in a scan or query.

This is a pure data container. It does not own routing, retries, or execution state.

Summary

Types

Per-partition resume state used by scan/query pagination.

t()

Partition selection and resume state for scans and queries.

Functions

All partitions (begin: 0, count: 4096).

Resume from a specific record digest.

One partition by id.

A contiguous partition range.

Returns the fixed Aerospike partition count.

Types

partition_entry()

@type partition_entry() :: %{
  :id => non_neg_integer(),
  optional(:digest) => binary() | nil,
  optional(:bval) => integer() | nil
}

Per-partition resume state used by scan/query pagination.

:digest and :bval represent the last server cursor position for the partition, not user-key order.

t()

@type t() :: %Aerospike.PartitionFilter{
  begin: non_neg_integer(),
  count: pos_integer(),
  digest: binary() | nil,
  done?: boolean(),
  partitions: [partition_entry()],
  retry?: boolean()
}

Partition selection and resume state for scans and queries.

begin and count select the partition range for new work. digest is an optional digest resume point. partitions carries per-partition resume entries produced during pagination. done? and retry? are runtime state flags used by the scan/query executor.

Functions

all()

@spec all() :: t()

All partitions (begin: 0, count: 4096).

by_digest(digest)

@spec by_digest(<<_::160>>) :: t()

Resume from a specific record digest.

The digest must be exactly 20 bytes. This selects the full partition space with an initial digest resume point.

by_id(partition_id)

@spec by_id(non_neg_integer()) :: t()

One partition by id.

Valid ids are 0..4095.

by_range(begin_part, count)

@spec by_range(non_neg_integer(), pos_integer()) :: t()

A contiguous partition range.

begin_part + count must not exceed partition_count/0.

partition_count()

@spec partition_count() :: pos_integer()

Returns the fixed Aerospike partition count.