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

SQL: client identification harmonisation #52536

Closed
bpintea opened this issue Feb 19, 2020 · 2 comments
Closed

SQL: client identification harmonisation #52536

bpintea opened this issue Feb 19, 2020 · 2 comments
Labels
:Analytics/SQL SQL querying

Comments

@bpintea
Copy link
Contributor

bpintea commented Feb 19, 2020

The REST request objects currently contain two client identification-related fields:

  • mode which can be explicitly one of: CLI, JDBC, ODBC or PLAIN (=default, if nothing else specified);
  • client_id which can be one of CANVAS, CLI, JDBC, ODBC32, ODBC64 or REST (=default, if nothing else specified); as well as a now historical ODBC.

While the two fields came to be with gradual evolution and have technically different purposes - former, for response generation, latter, for telemetry purposes - there is an injective relationship between them and thus a redundancy.

With the advent of version compatibility effort, there is the possibility of simplifying the code processing[2] them and harmonising their usage in the client[1].

The proposal is to simply extract the mode from the client_id, as the simplest change, since all the clients populate that field already.
An alternative to that would be to drop them both and replace the source of information from a (new to add) HTTP header (potentially usable in conjunction with another versioning header).

[1] Usage by client:

  • Kibana/Canvas: client_id
  • Kibana/Console: none
  • JDBC, CLI: mode
  • ODBC: both.

[2] Telemetry client identification, currently:

  • if mode==ODBC : client_id
  • else if mode==PLAIN (i.e. mode absent, in practice) : client_id
  • else: "toString"(mode).
    and that resolves either to an enum'ed client_id or defaults to REST, if no match.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

@bpintea
Copy link
Contributor Author

bpintea commented Apr 6, 2020

Proposal dropped for the convenience of possibly later adding more client_ids.

@bpintea bpintea closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying
Projects
None yet
Development

No branches or pull requests

3 participants