Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::Storage Struct Reference

Static Public Member Functions

static void VerifyBlockAllocSize (const idx_t block_alloc_size)
 Ensures that a user-provided block allocation size matches all requirements.
static void VerifyBlockHeaderSize (const idx_t block_header_size)

Static Public Attributes

static constexpr idx_t SECTOR_SIZE = 4096U
 The size of a hard disk sector, only really needed for Direct IO.
static constexpr idx_t FILE_HEADER_SIZE = 4096U
static constexpr const idx_t MAX_ROW_GROUP_SIZE = 1ULL << 30ULL
 The maximum row group size.
static constexpr idx_t MIN_BLOCK_ALLOC_SIZE = 16384ULL
 The minimum block allocation size. This is the minimum size we test in our nightly tests.
static constexpr idx_t MAX_BLOCK_ALLOC_SIZE = 262144ULL
 The maximum block allocation size. This is the maximum size currently supported by duckdb.
static constexpr idx_t DEFAULT_BLOCK_HEADER_SIZE = sizeof(idx_t)
 The default block header size for blocks written to storage.
static constexpr idx_t MAX_BLOCK_HEADER_SIZE = 128ULL
 The default block header size for blocks written to storage.
static constexpr idx_t DEFAULT_BLOCK_SIZE = DEFAULT_BLOCK_ALLOC_SIZE - DEFAULT_BLOCK_HEADER_SIZE
 The default block size.

Member Function Documentation

◆ VerifyBlockAllocSize()

void duckdb::Storage::VerifyBlockAllocSize ( const idx_t block_alloc_size)
static

Ensures that a user-provided block allocation size matches all requirements.

426037 {
426038 if (!IsPowerOfTwo(block_alloc_size)) {
426039 throw InvalidInputException("the block size must be a power of two, got %llu", block_alloc_size);
426040 }
426041 if (block_alloc_size < MIN_BLOCK_ALLOC_SIZE) {
426042 throw InvalidInputException(
426043 "the block size must be greater or equal than the minimum block size of %llu, got %llu",
426044 MIN_BLOCK_ALLOC_SIZE, block_alloc_size);
426045 }
426046 if (block_alloc_size > MAX_BLOCK_ALLOC_SIZE) {
426047 throw InvalidInputException(
426048 "the block size must be lesser or equal than the maximum block size of %llu, got %llu",
426049 MAX_BLOCK_ALLOC_SIZE, block_alloc_size);
426050 }
426051 auto max_value = NumericCast<idx_t>(NumericLimits<int32_t>().Maximum());
426052 if (block_alloc_size > max_value) {
426053 throw InvalidInputException(
426054 "the block size must not be greater than the maximum 32-bit signed integer value of %llu, got %llu",
426055 max_value, block_alloc_size);
426056 }
426057}
static constexpr idx_t MAX_BLOCK_ALLOC_SIZE
The maximum block allocation size. This is the maximum size currently supported by duckdb.
Definition duckdb.hpp:9714
static constexpr idx_t MIN_BLOCK_ALLOC_SIZE
The minimum block allocation size. This is the minimum size we test in our nightly tests.
Definition duckdb.hpp:9712
Here is the caller graph for this function:

◆ VerifyBlockHeaderSize()

void duckdb::Storage::VerifyBlockHeaderSize ( const idx_t block_header_size)
static
426059 {
426060 if ((block_header_size & 7) != 0) {
426061 // Alignment to 8 bytes is necessary for computing the checksum
426062 throw InvalidInputException("the block size must a multiple of 8, got %llu", block_header_size);
426063 }
426064 if (block_header_size < DEFAULT_BLOCK_HEADER_SIZE) {
426065 throw InvalidInputException(
426066 "the block header size must be greater or equal than the default block header of %llu, got %llu",
426067 DEFAULT_BLOCK_HEADER_SIZE, block_header_size);
426068 }
426069 if (block_header_size > MAX_BLOCK_HEADER_SIZE) {
426070 throw InvalidInputException(
426071 "the block header size must be lesser or equal than the maximum block size of %llu, got %llu",
426072 MAX_BLOCK_ALLOC_SIZE, block_header_size);
426073 }
426074}
static constexpr idx_t MAX_BLOCK_HEADER_SIZE
The default block header size for blocks written to storage.
Definition duckdb.hpp:9718
static constexpr idx_t DEFAULT_BLOCK_HEADER_SIZE
The default block header size for blocks written to storage.
Definition duckdb.hpp:9716

Member Data Documentation

◆ FILE_HEADER_SIZE

idx_t duckdb::Storage::FILE_HEADER_SIZE = 4096U
staticconstexpr

The size of the headers. This should be small and written more or less atomically by the hard disk. We default to the page size, which is 4KB. (1 << 12)


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