This commit is contained in:
Martin Grigorov 2025-07-03 17:27:01 +01:00 committed by GitHub
commit 7c2898c946
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 12 deletions

View file

@ -174,11 +174,13 @@ impl FeatureData {
let persisted_features: RuntimeTogglableFeatures =
runtime_features_db.get(wtxn, db_keys::EXPERIMENTAL_FEATURES)?.unwrap_or_default();
let InstanceTogglableFeatures { metrics, logs_route, contains_filter } = instance_features;
let InstanceTogglableFeatures { metrics, logs_route, contains_filter, chat_completions } =
instance_features;
let runtime = Arc::new(RwLock::new(RuntimeTogglableFeatures {
metrics: metrics || persisted_features.metrics,
logs_route: logs_route || persisted_features.logs_route,
contains_filter: contains_filter || persisted_features.contains_filter,
chat_completions: chat_completions || persisted_features.chat_completions,
..persisted_features
}));

View file

@ -45,6 +45,8 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, RwLock};
use std::time::Duration;
use crate::index_mapper::IndexMapper;
use crate::utils::clamp_to_page_size;
use dump::Dump;
pub use error::Error;
pub use features::RoFeatures;
@ -74,9 +76,6 @@ use scheduler::Scheduler;
use time::OffsetDateTime;
use versioning::Versioning;
use crate::index_mapper::IndexMapper;
use crate::utils::clamp_to_page_size;
pub(crate) type BEI128 = I128<BE>;
const TASK_SCHEDULER_SIZE_THRESHOLD_PERCENT_INT: u64 = 40;
@ -276,7 +275,7 @@ impl IndexScheduler {
.open(&options.tasks_path)
}?;
// We **must** starts by upgrading the version because it'll also upgrade the required database before we can open them
// We **must** start by upgrading the version because it'll also upgrade the required database before we can open them
let version = versioning::Versioning::new(&env, from_db_version)?;
let mut wtxn = env.write_txn()?;