Skip to content

Add optional client id upon attach#183

Open
ccfelius wants to merge 2 commits into
duckdb:mainfrom
ccfelius:recon_disconnect_ttl
Open

Add optional client id upon attach#183
ccfelius wants to merge 2 commits into
duckdb:mainfrom
ccfelius:recon_disconnect_ttl

Conversation

@ccfelius

Copy link
Copy Markdown
Member

This PR is part of multiple PRs to implement reconnects - extensive explanation in https://github.com/duckdblabs/duckdb-internal/issues/9576.

This PR adds the possibility to manually pass a client_id. The client optionally passes a client_id string when attaching:
ATTACH {server} AS remote (token 'asdf', client_id 'random_client_id'). This client_id is propagated to the server, along with a token.

After successful authentication the server then computes a hash(session_id + token + client_id), since these 3 values produce a different hash for each server/token. This is stored in a QuackConnection , and the hash is exposed in the quack_active_connections().

This could also be useful for e.g. logging, since this makes tracking a specific client more explicit. But this should be added to the logger.

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.

1 participant