Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
Loading...
Searching...
No Matches
LanceSessionCacheStats Struct Reference

#include <lance/lance.h>

Public Attributes

uint64_t index_cache_hits
 
uint64_t index_cache_misses
 
uint64_t index_cache_entries
 
uint64_t index_cache_size_bytes
 
uint64_t metadata_cache_hits
 
uint64_t metadata_cache_misses
 
uint64_t metadata_cache_entries
 
uint64_t metadata_cache_size_bytes
 

Detailed Description

Thread-safety contract for opaque handles and exported streams.

A handle pointer is a lifetime token, not a lock. A const parameter or a native Send/Sync bound does not by itself allow arbitrary concurrent calls through one C pointer; only the operations described here and at the handle's own declaration may overlap. Handles not listed here are not implicitly shareable.

  • LanceDataset: snapshot reads and in-place mutations may run concurrently. Mutations serialize on the handle's internal write lock, which is held for the complete native call, including synchronous callbacks. Readers that already hold a snapshot keep their old view.
  • LanceSession: inspection calls may run concurrently, and one session may back concurrent opens. Statistics are current values, not one atomic snapshot across cache tiers.
  • LanceFileReader: read-only calls may run concurrently. Each read creates an independent stream.
  • LanceNamespace: ordinary calls may run concurrently. Custom operation and context-provider callbacks must be thread-safe.
  • LanceScanner and LanceFileWriter: serialize all calls on one handle.
  • ArrowArrayStream: serialize get_schema, get_next, get_last_error and release on one stream. Different streams are independent. get_last_error returns a borrowed pointer owned by the stream; it is valid only until the next operation on that stream or release.

lance_*_close and lance_*_free take exclusive ownership of their pointer: they must not overlap any other use of that pointer. Closing a handle releases only that handle. Successfully returned children and snapshots keep the native ownership described at their declarations and may outlive the producer. Borrowed pointers keep only their documented lifetime; concurrent use of the producer does not extend it, and a mutable call or close may invalidate it.

Synchronous callbacks run inside the native call that invoked them. A callback must not close or re-enter the handle whose call is still on the stack; use an independent handle or a snapshot acquired before the call. Callbacks that native code may run on another thread or concurrently must be thread-safe as stated at their declaration. Snapshot of a shared session's cache statistics.

Cache sizes are the bytes currently retained, not their configured limits.

Definition at line 338 of file lance.h.

Member Data Documentation

◆ index_cache_entries

uint64_t LanceSessionCacheStats::index_cache_entries

Definition at line 341 of file lance.h.

◆ index_cache_hits

uint64_t LanceSessionCacheStats::index_cache_hits

Definition at line 339 of file lance.h.

◆ index_cache_misses

uint64_t LanceSessionCacheStats::index_cache_misses

Definition at line 340 of file lance.h.

◆ index_cache_size_bytes

uint64_t LanceSessionCacheStats::index_cache_size_bytes

Definition at line 342 of file lance.h.

◆ metadata_cache_entries

uint64_t LanceSessionCacheStats::metadata_cache_entries

Definition at line 345 of file lance.h.

◆ metadata_cache_hits

uint64_t LanceSessionCacheStats::metadata_cache_hits

Definition at line 343 of file lance.h.

◆ metadata_cache_misses

uint64_t LanceSessionCacheStats::metadata_cache_misses

Definition at line 344 of file lance.h.

◆ metadata_cache_size_bytes

uint64_t LanceSessionCacheStats::metadata_cache_size_bytes

Definition at line 346 of file lance.h.


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