mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-04 14:00:38 +00:00
wip
This commit is contained in:
@@ -1273,6 +1273,10 @@ impl Service {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: we need to recognize that this is an update, issue a DB
|
||||
// transaction to update the shards, and _then_ apply in memory. Need
|
||||
// the tenant equivalent of node_configure()
|
||||
|
||||
shard.config = req.config.tenant_conf.clone();
|
||||
shard.schedule(scheduler)?;
|
||||
|
||||
|
||||
@@ -289,6 +289,14 @@ pub struct TenantConfig {
|
||||
pub timeline_get_throttle: Option<ThrottleConfig>,
|
||||
}
|
||||
|
||||
impl TenantConfig {
|
||||
pub fn merge(&mut self, other: &TenantConfig) {
|
||||
if let Some(max_lsn_wal_lag) = &other.max_lsn_wal_lag {
|
||||
self.max_lsn_wal_lag = Some(*max_lsn_wal_lag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(tag = "kind")]
|
||||
pub enum EvictionPolicy {
|
||||
|
||||
@@ -385,7 +385,7 @@ def test_sharding_service_onboarding(
|
||||
dest_tenant_after_conf_change["generation"] == dest_tenant_before_conf_change["generation"]
|
||||
)
|
||||
dest_tenant_conf_after = dest_ps.http_client().tenant_config(tenant_id)
|
||||
assert dest_tenant_conf_after == TenantConfig.from_json(modified_tenant_conf)
|
||||
assert dest_tenant_conf_after.tenant_specific_overrides == modified_tenant_conf
|
||||
|
||||
env.attachment_service.consistency_check()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user