135 size_t page_size,
bool for_read_only) = 0;
144 const std::string &old_path,
145 const std::string &new_path) = 0;
217 size_t page_size) = 0;
224 case ib::fil::Tablespaces_nodes_interface::Node_error::x: \
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:49
uint32_t page_no_t
Page number.
Definition: api0api.h:47
The class error is used to emit error messages.
Definition: ut0log.h:225
Manages low-level storage for Tablespaces.
Definition: fil0tablespaces_nodes_interface.h:37
virtual ut::Expected< ut::unique_ptr< Tablespace_node_handle_interface >, Open_error > open(Tablespace_id space_id, size_t node_order, const Node_hints &hints, size_t page_size, bool for_read_only)=0
Opens an existing tablespace's node storage by path, so it is ready to read and write pages,...
virtual ut::Expected< Node_info, Node_error > get_node_info(Tablespace_id space_id, size_t node_order, const Node_hints &hints, size_t page_size)=0
Gets basic information about the node specified, this includes its size (first page offset that is no...
virtual Status rename(space_id_t space_id, size_t node_order, const std::string &old_path, const std::string &new_path)=0
Rename a tablespace file.
virtual ut::Expected< ut::unique_ptr< Tablespace_node_handle_interface >, Create_error > create(Tablespace_id space_id, size_t node_order, const Create_node_hints &hints, uint32_t flags, page_no_t size_in_pages)=0
Creates a low-level storage for a new tablespace node.
uint32_t Tablespace_id
Type used for giving the tablespaces unique number.
Definition: fil0tablespaces_nodes_interface.h:40
Open_error
Definition: fil0tablespaces_nodes_interface.h:111
Status
Definition: fil0tablespaces_nodes_interface.h:64
virtual Status remove(Tablespace_id space_id, size_t node_order, const Node_hints &hints)=0
Deletes a specified tablespace's node storage by path.
Create_error
Definition: fil0tablespaces_nodes_interface.h:66
virtual Capabilities get_capabilities()=0
Query the capabilities of the Page Service implementation.
virtual ~Tablespaces_nodes_interface()=default
Performs any clean up.
Node_error
Errors that can be returned while getting information about a node.
Definition: fil0tablespaces_nodes_interface.h:159
@ NOT_A_NODE
The specified node does not exist, but the hinted path is used by something that is not a node and ca...
@ IO_ERROR
A generic error occurred during the operation, the existence of the node could not be determined.
@ NODE_DOES_NOT_EXIST
The specified node does not exist and the hinted path is free to be reserved by any new node.
C++23 std::expected.
Definition: ut0expected.h:74
ut::unique_ptr< ib::fil::Tablespaces_nodes_interface > tablespaces_nodes
The low-level tablespaces' nodes' storage implementation.
Definition: fil0fil.cc:1388
static int flags[50]
Definition: hp_test1.cc:40
Definition: fil0fil.cc:1392
constexpr const char * to_string(ib::fil::Tablespaces_nodes_interface::Node_error error)
Definition: fil0tablespaces_nodes_interface.h:220
void set_tablespaces_nodes(ut::unique_ptr< Tablespaces_nodes_interface > new_tablepsaces_nodes)
Definition: fil0fil.cc:1394
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2284
A class describing a page size.
Stores information about access modes to the resource permitted to the caller at the moment of checki...
Definition: os0file.h:1776
Definition: fil0tablespaces_nodes_interface.h:48
bool supports_transparent_data_encryption
Definition: fil0tablespaces_nodes_interface.h:54
bool supports_bulk_load
Definition: fil0tablespaces_nodes_interface.h:52
bool supports_import_tablespace
Definition: fil0tablespaces_nodes_interface.h:50
bool supports_dblwr
Definition: fil0tablespaces_nodes_interface.h:49
bool supports_discard_tablespace
Definition: fil0tablespaces_nodes_interface.h:51
bool supports_raw_devices
Definition: fil0tablespaces_nodes_interface.h:56
bool supports_clone
Definition: fil0tablespaces_nodes_interface.h:53
bool supports_transparent_page_compression
Definition: fil0tablespaces_nodes_interface.h:55
Definition: fil0tablespaces_nodes_interface.h:86
Node_hints m_base_hints
Definition: fil0tablespaces_nodes_interface.h:87
const bool m_is_explicit_undo
Specifies if the m_path is for an explicit undo tablespace.
Definition: fil0tablespaces_nodes_interface.h:89
Definition: fil0tablespaces_nodes_interface.h:76
const bool m_check_permissions
Specifies if get_node_info() should probe current access permissions.
Definition: fil0tablespaces_nodes_interface.h:83
const std::string m_path
Path and filename of the node to process.
Definition: fil0tablespaces_nodes_interface.h:78
const bool m_is_raw_disk
Specifies if the m_path is a raw device or disk partition.
Definition: fil0tablespaces_nodes_interface.h:80
Stored general information about the storage node at the time of calling the get_node_info().
Definition: fil0tablespaces_nodes_interface.h:173
Access_permissions access_permissions
Determines if caller would succeed to open the path if they tried now, with specified access modes.
Definition: fil0tablespaces_nodes_interface.h:190
uint32_t block_size
Block size to use for IO in bytes.
Definition: fil0tablespaces_nodes_interface.h:179
page_no_t size
Size of the node in pages.
Definition: fil0tablespaces_nodes_interface.h:175
uint64_t alloc_size
Actual file size that is, the amount of space allocated on the file system.
Definition: fil0tablespaces_nodes_interface.h:182
Minimal implementation of C++23 std::expected.
Dynamic memory allocation routines and custom allocators specifically crafted to support memory instr...