When introducing configuration changes that affect multiple system components, implement them in stages to ensure smooth transitions and backward compatibility. Follow these steps:
When introducing configuration changes that affect multiple system components, implement them in stages to ensure smooth transitions and backward compatibility. Follow these steps:
Example:
// Step 1: Add new option while keeping old
impl Config {
fn get_safekeeper_info(&self) -> String {
// Support both old and new formats
self.safekeeper_connstrings.clone()
.or_else(|| self.safekeepers.map(|s| convert_to_new_format(s)))
.unwrap_or_default()
}
}
// Step 2: Wait for release with dual support
// Step 3: Switch dependent components to new format
conf.append("neon.safekeeper_connstrings", &safekeepers);
// Instead of old: conf.append("neon.safekeepers", &safekeepers);
// Step 4: Remove old option in future release
This approach:
Enter the URL of a public GitHub repository