Skip to content

Namespace passing in http header - #1179

Merged
LucioFranco merged 91 commits into
tursodatabase:mainfrom
Shopify:jw/namespace-passing-and-auth
Apr 22, 2024
Merged

Namespace passing in http header#1179
LucioFranco merged 91 commits into
tursodatabase:mainfrom
Shopify:jw/namespace-passing-and-auth

Conversation

@shopifyski

@shopifyski shopifyski commented Mar 8, 2024

Copy link
Copy Markdown
Contributor

Adding alternative to namespace inference from hostname prefix.
Utilizing NAMESPACE_METADATA_KEY to transfer namespace.
Tested with remote_sync example:

penberg and others added 19 commits April 16, 2024 16:55
Builds of arm images are hanging/crashing
* bottomless: upgrade s3 sdk to 1.0

* fix behavior version
* server: add query stats to hrana responses

* update spec with stats

* remove unused import

* fix snapshot

* more snapshots

* add stats to legacy api

* address comments
Old implementation could never finish if the write is faster than
time needed to do two round-trips to primary.

For example it's enough to have a write every 200ms to make sync
never finish if it's done in embedded replica in Sydney
if the primary and the writer are in the US.

Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
* server: add `query_duration_ms` stats to query res

* hrana: default new stats fields
This reverts commit a86b89d.
@LucioFranco
LucioFranco added this pull request to the merge queue Apr 22, 2024
Merged via the queue into tursodatabase:main with commit ca8834c Apr 22, 2024
@jeremywrowe
jeremywrowe deleted the jw/namespace-passing-and-auth branch April 23, 2024 13:39
@MarinPostma

Copy link
Copy Markdown
Contributor

This is a breaking change for the platform. The x-namespace-bin should be base64 encoded. We just hit this issue deploying a new canary image.

FYI, I'll patch that to base64 decode the header value.

@MarinPostma

MarinPostma commented May 22, 2024

Copy link
Copy Markdown
Contributor

scrap that, the platform was in the wrong

update: the header should be base64 encoded

github-merge-queue Bot pushed a commit that referenced this pull request Jun 4, 2025
Following the work @shopifyski did to add the ability to set namespace
via header for `RemoteReplica` in #1179 this adds similar support for
`Remote` connection.
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.

6 participants