| 628 | } |
| 629 | |
| 630 | void SessionManager::recordLoadedSource(QString path, QString prefix, QString plugin_id, QString plugin_config_json) { |
| 631 | LoadedSource source{std::move(path), std::move(prefix), std::move(plugin_id), std::move(plugin_config_json)}; |
| 632 | // Dedup by path: a reload of an already-tracked file updates its entry in |
| 633 | // place (keeping list order) rather than appending a duplicate. |
| 634 | const auto it = std::find_if(loaded_sources_.begin(), loaded_sources_.end(), [&source](const LoadedSource& existing) { |
| 635 | return existing.path == source.path; |
| 636 | }); |
| 637 | if (it != loaded_sources_.end()) { |
| 638 | *it = std::move(source); |
| 639 | } else { |
| 640 | loaded_sources_.push_back(std::move(source)); |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | void SessionManager::evictDatasetObjects(DatasetId dataset_id) { |
| 645 | evictObjectTopics(object_store_.listTopics(dataset_id)); |