◆ BlockIndexManager() [1/2]
| duckdb::BlockIndexManager::BlockIndexManager |
( |
| ) |
|
442767}
optional_ptr< TemporaryFileManager > manager
The TemporaryFileManager that "owns" this BlockIndexManager.
Definition duckdb.cpp:61603
idx_t max_index
The maximum block index.
Definition duckdb.cpp:61597
◆ BlockIndexManager() [2/2]
◆ GetNewBlockIndex()
| idx_t duckdb::BlockIndexManager::GetNewBlockIndex |
( |
TemporaryBufferSize | size | ) |
|
Obtains a new block index from the index manager.
442772 {
442776}
set< idx_t > indexes_in_use
Used indexes within the file.
Definition duckdb.cpp:61601
idx_t GetNewBlockIndexInternal(TemporaryBufferSize size)
Get/set max block index.
Definition duckdb.cpp:442815
◆ RemoveIndex()
| bool duckdb::BlockIndexManager::RemoveIndex |
( |
idx_t | index, |
|
|
TemporaryBufferSize | size ) |
Removes an index from the block manager (returns true if the max_index has been altered).
442778 {
442779
442782 throw InternalException("RemoveIndex - index %llu not found in indexes_in_use", index);
442783 }
442786
442787
442788
442791
442792
442793 SetMaxIndex(max_index_in_use, size);
442794
442798 break;
442799 }
442801 }
442802 return true;
442803 }
442804 return false;
442805}
bool HasFreeBlocks() const
Whether there are free blocks available within the file.
Definition duckdb.cpp:442811
set< idx_t > free_indexes
Free indexes within the file.
Definition duckdb.cpp:61599
◆ GetMaxIndex()
| idx_t duckdb::BlockIndexManager::GetMaxIndex |
( |
| ) |
const |
Get the maximum block index.
◆ HasFreeBlocks()
| bool duckdb::BlockIndexManager::HasFreeBlocks |
( |
| ) |
const |
Whether there are free blocks available within the file.
◆ GetNewBlockIndexInternal()
| idx_t duckdb::BlockIndexManager::GetNewBlockIndexInternal |
( |
TemporaryBufferSize | size | ) |
|
|
private |
Get/set max block index.
442815 {
442819 return new_index;
442820 }
442822 auto index = *entry;
442825}
◆ SetMaxIndex()
| void duckdb::BlockIndexManager::SetMaxIndex |
( |
idx_t | new_index, |
|
|
TemporaryBufferSize | size ) |
|
private |
442827 {
442828 const auto temp_file_block_size =
442829 size == TemporaryBufferSize::DEFAULT ? DEFAULT_BLOCK_ALLOC_SIZE : TemporaryBufferSizeToSize(size);
442832 } else {
442834 if (new_index < old) {
442836 const auto difference = old - new_index;
442837 const auto size_on_disk = difference * temp_file_block_size;
442838 manager->DecreaseSizeOnDisk(size_on_disk);
442839 } else if (new_index > old) {
442840 const auto difference = new_index - old;
442841 const auto size_on_disk = difference * temp_file_block_size;
442842 manager->IncreaseSizeOnDisk(size_on_disk);
442843
442845 }
442846 }
442847}
GOpaque< Size > size(const GMat &src)
The documentation for this struct was generated from the following file: