Add zero-downtime OpenSearch index deployments#1
Open
stevebauman wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Deployerservice for provisioning versioned candidates, explicitly beginning backfills, marking candidates ready, atomically moving aliases, rolling back, cancelling candidates, and retiring previous indexes.backfill,ready,cutover,rollback,cancel,retire, andstatusdeployment commands.DeploymentandDeploymentStatus.opensearch_deploymentsdatabase table throughDeploymentRepository.opensearch-deployments.php.migrate:freshto explicitly clear their records.Why
Rebuilding an index currently requires dropping the live index and importing every searchable record again. That creates downtime or incomplete search results while the replacement index is populated.
This introduces the package-level lifecycle needed for blue-green index deployments. Applications can inspect a provisioned candidate before enabling concurrent writes, populate it while the current alias stays live, and atomically promote it only after validation. The previous physical index remains available for rollback until it is explicitly retired.
Developer impact
Applications can resolve
Deployerfrom the container or use the deployment lifecycle commands to orchestrate their own backfill and validation process. Deployment state is durable, and interrupted alias cutovers or rollbacks can safely resume.Existing applications are unaffected unless they opt into managed deployments. Publishing the package configuration now also publishes
opensearch-deployments.php.Validation
vendor/bin/pint src tests README.mdvendor/bin/pest --compact— 115 tests passed, 315 assertionsgit diff --check