Skip to content

[Do not merge] Rename PersistenceType to StorageType - #6084

Open
rbev wants to merge 3 commits into
masterfrom
rename-persistencetype
Open

rbev wants to merge 3 commits into
masterfrom
rename-persistencetype

Conversation

@rbev

@rbev rbev commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Important

Targeted for 7.0, should not be merged to master until it is time to mark that branch for the major update

Rename the Error and Audit instance storage setting to match the ServiceControl 7 documentation. Preserve the selected storage engine when the installer upgrades an existing instance.

Changes

  • Rename the runtime settings properties, constructor parameters, configuration keys, environment variables, diagnostics, and acceptance-test configuration to StorageType.
  • Update the development configuration files and Dockerfile environment settings. Container images retain their existing RavenDB default under the new name.
  • Rename the testing tool's --persistence option to --storage and update its README, UI guidance, and load-testing documentation.
  • Update configuration approval files and remove an unused approval file.

Upgrade behavior

The installer reads StorageType first and falls back to PersistenceType when the new setting is absent or blank. Configuration writes use the resolved persistence manifest to populate StorageType, preserving the selected engine rather than migrating data.

The installer removes PersistenceType when the installed instance reaches version 7.0.0, including prereleases. Earlier instances retain the legacy key so their runtimes can continue reading it. This applies to both Error and Audit instances and covers configuration edits and configuration restoration after an upgrade.

The runtime reads only StorageType; the legacy fallback belongs to the installer. Manually managed configurations and environment variables using PersistenceType must be renamed. The audit configuration API retains its existing persistence.persistence_type response field to avoid changing that public response shape.

@rbev rbev self-assigned this Nov 3, 2026
@rbev rbev changed the title Rename PersistenceType to StorageType [Do not merge] Rename PersistenceType to StorageType Nov 3, 2026
if (maintenanceMode && !persistenceConfiguration.SupportsMaintenanceMode)
{
throw new Exception($"Maintenance mode is not supported by the {settings.PersistenceType} persister. It is only available on RavenDB, where it starts the embedded database so RavenDB Studio can be used.");
throw new Exception($"Maintenance mode is not supported by the {settings.StorageType} persister. It is only available on RavenDB, where it starts the embedded database so RavenDB Studio can be used.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Exception($"Maintenance mode is not supported by the {settings.StorageType} persister. It is only available on RavenDB, where it starts the embedded database so RavenDB Studio can be used.");
throw new Exception($"Maintenance mode is not supported by the {settings.StorageType} storage type. It is only available on RavenDB, where it starts the embedded database so RavenDB Studio can be used.");

if (!persistenceConfiguration.SupportsMaintenanceMode)
{
throw new InvalidOperationException($"Maintenance mode is not supported by the {settings.PersistenceType} persister.");
throw new InvalidOperationException($"Maintenance mode is not supported by the {settings.StorageType} persister.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidOperationException($"Maintenance mode is not supported by the {settings.StorageType} persister.");
throw new InvalidOperationException($"Maintenance mode is not supported by the {settings.StorageType} storage type.");

@@ -76,7 +76,7 @@ public OkObjectResult Config()
},
Persistence = new

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What consumes this endpoint and uses this value? Should we look into that and rename to Storage to match https://github.com/Particular/ServiceControl/pull/6077/changes#diff-0dac823f83eb2baf7a60865a0e0f69a28455224625a193cc769ce543c36fbe12R82 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly

I changed it back because I didn't want to upset SP but it looks like it's only consumed internally in SC

@rbev
rbev force-pushed the rename-persistencetype branch from f6f8a46 to ae65403 Compare November 4, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants