| 109 | } |
| 110 | |
| 111 | shared_ptr<ArraySchema> ArrayDirectory::load_array_schema_latest( |
| 112 | const EncryptionKey& encryption_key, |
| 113 | shared_ptr<MemoryTracker> memory_tracker) const { |
| 114 | auto timer_se = |
| 115 | resources_.get().stats().start_timer("sm_load_array_schema_latest"); |
| 116 | |
| 117 | if (uri_.is_invalid()) { |
| 118 | throw ArrayDirectoryException( |
| 119 | "Cannot load array schema; Invalid array URI"); |
| 120 | } |
| 121 | |
| 122 | // Load schema from URI |
| 123 | const URI& schema_uri = latest_array_schema_uri(); |
| 124 | auto&& array_schema = load_array_schema_from_uri( |
| 125 | resources_.get(), schema_uri, encryption_key, memory_tracker); |
| 126 | |
| 127 | array_schema->set_array_uri(uri_.remove_trailing_slash()); |
| 128 | |
| 129 | return std::move(array_schema); |
| 130 | } |
| 131 | |
| 132 | tuple< |
| 133 | shared_ptr<ArraySchema>, |