Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new keyspace commands, deprecate namespace commands #1376

Closed
jeffreyscarpenter opened this issue Aug 28, 2024 · 3 comments
Closed

Add new keyspace commands, deprecate namespace commands #1376

jeffreyscarpenter opened this issue Aug 28, 2024 · 3 comments
Assignees

Comments

@jeffreyscarpenter
Copy link
Contributor

As described in #1373:

Add keyspace operations to the API to parallel the namespace operations, and mark the namespace operations as deprecated.

  • FindNamespaces -> FindKeyspaces
  • CreateNamespace → CreateKeyspace
  • DropNamespace → DropKeyspace
  • Return a warning message in the response of the keyspace operations that indicates use of a deprecated command.
  • One way to do this in code: rename existing operations to their new names, add operations with the old names, marked as deprecated, which act as aliases to the new operations.
  • Make sure all metrics/logging reference new operation names. We do not want to capture metrics/logging for the old operation names.
  • Make sure swagger/OpenAPI marks old operation names as deprecated.
@Yuqi-Du
Copy link
Contributor

Yuqi-Du commented Sep 11, 2024

Note,
What differs to the original ticket is that we decide to keep the deprecated commands metrics and logs . So, two different metrics and logs even these commands are the 'same'.

E.G. createNamespaceCommand, createKeyspaceCommand.
e,g.

command_processor_process_seconds_count{command="CreateKeyspaceCommand",error="false",error_class="NA",error_code="NA",module="sgv2-jsonapi",sort_type="NONE",tenant="unknown",vector_enabled="false",} 1.0

command_processor_process_seconds_count{command="CreateNamespaceCommand",error="false",error_class="NA",error_code="NA",module="sgv2-jsonapi",sort_type="NONE",tenant="unknown",vector_enabled="false",} 1.0

@Yuqi-Du
Copy link
Contributor

Yuqi-Du commented Sep 11, 2024

Regarding warning msg, here is the example:

{
    "status": {
        "namespaces": [
            "fixs",
            "system_auth",
            "system_schema",
        ],
        "warnings": [
            "deprecated command \"FindNamespaces\", please switch to \"FindKeyspaces\"."
        ]
    }
}

the change is, we add a command status key called warnings that is a list / json array of strings. Include the deprecation notice in that, and we can re-use this status field with API Tables to warn about missing indexes.

@jeffreyscarpenter
Copy link
Contributor Author

@Yuqi-Du can we close this issue now since the linked PR is merged?

@sync-by-unito sync-by-unito bot closed this as completed Oct 3, 2024
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

No branches or pull requests

2 participants