lasdf1234 opened a new issue, #14970: URL: https://github.com/apache/gravitino/issues/14970
### What would you like to be improved? Follow-up to #14954 / #13439. After versioned write-through alters land, `SecretManager` still has two parallel orchestration APIs: - **Create:** `assembleSecretMaterials` → `writeSecrets(List<SecretMaterial>)` → `rollbackSecrets(List)` on failure - **Alter:** `stageSecrets` / `prepareSecretVersions` → `commitSecrets` / `rollbackSecrets(SecretVersionChanges)` Callers must learn two lifecycles, and `SecretMaterial` exists only to serve the create path. The alter path already shows the better shape: stage pending provider writes, commit after the entity update succeeds, rollback on failure (`previousId == null` covers first bind / create-like writes). ### How should we improve? 1. Rename (if not already done in #14954): `prepareSecretVersions` → `stageSecrets` (keep `commitSecrets` / `rollbackSecrets`). 2. Move catalog / schema / fileset **create** onto `stageSecrets` → `commitSecrets` / `rollbackSecrets(SecretVersionChanges)`. 3. Delete `writeSecrets(List)`, `rollbackSecrets(List)`, and `SecretMaterial` once unused. 4. Rename `SecretMaterialsHolder` to something that matches `SecretVersionChanges` (e.g. `SecretVersionChangesHolder`), or inline it. 5. Keep SPI as-is: `writeSecret` / `deleteSecret` plus the four version methods; keep `deleteSecretsFromProperties` for drop. Out of scope unless product asks later: failing the alter when `commitSecrets` partially fails, or repairing the crash window between entity commit and secret commit. ### Related - PR: #14954 - Issue: #13439 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
