21 namespace foreign_storage {
23 const std::string& table_name,
24 const bool evict_cached_entries) {
27 std::make_unique<lockmgr::TableSchemaLockContainer<lockmgr::WriteLock>>(
29 catalog, table_name,
false));
33 throw std::runtime_error{
35 " is not a foreign table. Refreshes are applicable to only foreign tables."};
42 !evict_cached_entries) {
44 data_mgr.getChunkMetadataVecForKeyPrefix(metadata_vec, table_key);
45 int last_fragment_id = 0;
46 for (
const auto& [key, metadata] : metadata_vec) {
51 for (
const auto& [key, metadata] : metadata_vec) {
63 data_mgr.getPersistentStorageMgr()->getForeignStorageMgr()->refreshTable(
64 table_key, evict_cached_entries);
std::vector< int > ChunkKey
class for a per-database catalog. also includes metadata for the current database and the current use...
const foreign_storage::ForeignTable * getForeignTableUnlocked(int tableId) const
Data_Namespace::DataMgr & getDataMgr() const
#define CHUNK_KEY_FRAGMENT_IDX
void refresh_foreign_table(Catalog_Namespace::Catalog &catalog, const std::string &table_name, const bool evict_cached_entries)
std::runtime_error getOriginalException()
const DBMetadata & getCurrentDB() const
bool isAppendMode() const
Checks if the table is in append mode.
void removeFragmenterForTable(const int table_id) const
static constexpr char const * FOREIGN_TABLE
void updateForeignTableRefreshTimes(const int32_t table_id)