Repository navigation
v1.4.10
Server, pyhoglake, millrace and webui release.
- VARIANT shredding declarations can change. A new alter op,
set_variant_shredding, replaces or clears a declaration. WithHOGLAKE_COMPACTION_VARIANTon, compaction now rewrites a group of mixed VARIANT layouts per layout instead of refusing it. - Auth wave 1. hoglake owns its token contract and depends on no issuer. It accepts RS256 and the OAuth
scopeclaim, can be its own issuer (HOGLAKE_AUTH_MODE=local), forwards verified JWTs to hoglite, and gets storage for its own jobs through a credential provider. millrace and the webui now present credentials. - Hoglite maintenance. Options, expiry, cleanup, manual requeue and retirement now run on hoglite. Each is manual and per catalog; none has a background loop.
- Migrations: none. The newest migration is still V35.
- Upgrading: an existing deployment needs no config change. Every new setting defaults to the previous behaviour. Before rolling out, check the caveats under Operators: the auth
clientmetric label changes, anaudarray with a non-string entry is now refused, a millrace pod with two credential sources set exits, and VARIANT compaction needs extra heap headroom.
Server
set_variant_shredding(#580):{"op": "set_variant_shredding", "name": <column>, "shredding": <declaration> | null}onPOST …/tables/{t}/alter, on PostgreSQL and hoglite.nullor absent clears the declaration, and the column then has notype_params.- The declaration is validated as at
create_table/add_column: grammar, 1000 fields and arrays, 1024 bytes of path names, depth 16, top-level variant only. A refusal is a 422 with the same messages. - A change commits a DDL snapshot. A writer holding an older read gets 409
ddl_since_read_snapshotand re-reads, then writes the new layout. The column keeps its field ID, and earlier snapshots still show the old declaration. - An equal declaration is a no-op: it writes no snapshot or row and refuses no in-flight writer. Equality ignores key order and number spelling, and a stored absent,
{}or{"shredding": null}counts as no declaration. A request made only of no-ops answers 200 at the unmoved head, with the sampler's totals. - The declaration is a target for writers and compaction, not a rule on files. Files keep the layout their footer records.
- New capability
mutable-variant-shredding-v1. A server without it answers 400unknown alter op.
- VARIANT compaction by layout (#580, #614), with
HOGLAKE_COMPACTION_VARIANTon. server/README.md's VARIANT compaction section has the details.- Per-layout split. A group whose inputs hold more than one VARIANT layout is no longer refused:
- The service reads each input's footer once and hands it on to the rewrite, up to 16 MiB of serialized footer bytes per group.
- It partitions the inputs by how their layouts deviate from the declaration. Each partition that still meets the group-size rule is rewritten in its own layout, the declared layout first.
- Nothing is re-shredded: old-layout files compact among themselves.
- DuckDB-written files are excluded on their own, and partitions too small to compact are left alone.
- Only a field that is no VARIANT group, or one with a REPEATED node outside a LIST or MAP, still refuses its group as
unconvertible_schema.
- Catalog-scoped probe. The footer probe reads through the catalog's own storage session, as the rewrite does.
- Layout memory. A per-process map from
(catalog, data file)to the declaration and deviation fingerprints, capped at 250k entries. The planner packs known-deviating files only with files that deviate the same way, and drops known DuckDB files.- Compaction outputs are entered at commit.
- DDL on the table, such as
set_variant_shreddingor adding, dropping or renaming a variant column, makes the table's entries stale, so each file is probed once more. - The map is empty after a restart.
- Borrowing. A remembered remainder that is short of files can borrow idle never-probed files to complete a group:
- one loan per bucket per sweep, at most
minInputFiles − 1files, prefixes only; - the search is bounded to the first fan-in of idle files and the eight largest stranded populations;
- a loan is made only if every admitted main group keeps its files.
- #614 lets a loan draw from main groups that the budget refuses, and counts a failed loan's file once.
- one loan per bucket per sweep, at most
- Shape admission. Each deviating layout's shape (node count, nestedness, output leaves) is remembered, at most 4096 shapes, LRU.
- A sorted group of that layout is admitted against the sorted budgets with its own shape, from metadata alone.
- A layout the budgets refuse is probed once. After that it is refused from metadata as
spill_budget_exceeded/merge_budget_exceeded. - Raising
HOGLAKE_COMPACTION_SORTED_HEAP_BYTES/HOGLAKE_COMPACTION_SPILL_BYTESadmits it on the next plan. - Chunk sizing and the re-admission of each part use that part's own layout.
- Claims. A split group's claim is narrowed to the inputs it compacted, so files left behind can be planned again at once.
- Run limit. A probe that rewrites nothing is charged against
HOGLAKE_COMPACTION_MAX_GROUPS_PER_RUN. A group split into N parts uses N attempts, so the last wave of a sweep can overrun the limit by at most (layouts − 1) ×HOGLAKE_COMPACTION_PARALLEL_GROUPS. Groups without VARIANT columns behave as before. - New ledger counter
layout_probe_only, also in theCompactionResultAPI. - Metrics:
hoglake_compaction_variant_layout_mismatch_total{reason="split"|"duckdb"|"layout"}.splitis expected for as long as old-layout files remain after a declaration change.hoglake_compaction_variant_layout_outputs_total{layout="declared"|"other"}.hoglake_compaction_variant_layout_files_left_total.hoglake_compaction_skipped_total{reason="layout_probe_only"}.
- The docs now map the ledger's
spill_budget_exceeded/merge_budget_exceededtohoglake_compaction_skipped_total{reason="spill_budget"|"merge_budget"}(#614).
- Per-layout split. A group whose inputs hold more than one VARIANT layout is no longer refused:
- Token verification (#575, #576, #577):
docs/auth.mdis the canonical auth document. hoglake is a resource server: it issues no tokens on the request path and calls no issuer.docs/auth-tenancy.mdis now design history (#575).algmay beES256orRS256, and the JWKS may mix EC P-256 and RSA keys (#576):- A
kidmust select a key of the type itsalgneeds. - RSA keys under 2048 bits and JWKs whose
algcontradicts theirktyare refused at load. - Entries for other purposes, such as
useother thansigor an encryptionalg, are skipped.
- A
- Catalog grants may come from the OAuth
scopeclaim, as space-separatedhoglake:<catalog>:<scope>values (#576):- Non-
hoglake:values are ignored. - A malformed
hoglake:value refuses the token (invalid_token). - A token carrying both
catandscopemust have them agree.
- Non-
- Contract vectors are generated in hoglake (
just server contract-vectors), with anexpectverdict per vector (#577). tenis optional: a token without it is a tenant token. A token withouttenthat carriesprdis refused. Scoped and operator tokens still needten(#577).- New
HOGLAKE_AUTH_SCOPED_MAX_LIFETIME_SECONDS(default 900) (#577). - New
HOGLAKE_AUTH_CLIENT_CLASSES(default empty), up to 16 lowercase User-Agent product tokens, each with its ownclientlabel. The built-in map no longer names an issuer, andGo-http-clientis now labelledgo(#577).
- Local issuer (#595):
HOGLAKE_AUTH_MODE=localbehaves likeenforce, but trusts only the public half ofHOGLAKE_AUTH_SIGNING_KEY, an env-only base64url EC P-256 JWK.HOGLAKE_AUTH_ISSUERdefaults tohoglakein this mode.- Boot fails if a JWKS file or URL is also set, if the key is missing, or if the key is set under another mode.
- The key is redacted in config dumps.
GET /.well-known/jwks.json(public) serves the key's public half. In every other mode it answers 404.hoglake-server token keygenprintsHOGLAKE_AUTH_SIGNING_KEY=<value>.hoglake-server token mintsigns a token offline. Flags:--catalog <name>[=<scope>],--scope,--operator,--org,--sub,--client,--ttl(default 24h). It does not mint scoped (prd) tokens. Also available asjust server token ….HOGLAKE_PUBLIC_PORT,HOGLAKE_BACKENDS_FILEandHOGLAKE_MOUNT_HOSTS_FILEacceptlocalwherever they acceptedwarn/enforce.
- JWT forwarding to hoglite (#589):
- Only the current request's verified JWT is forwarded to the hoglite backend. Each request gets its own client wrapper, and transport, routing pins and breakers are shared.
- A hoglite 401 or 403 maps to 401
invalid_tokenor 403forbidden("backend refused request authority"). - Deleting a hoglite catalog requires an operator token (403 otherwise), checked before any write fence. Tenants are provisioned and deleted only by catalog-bound operator requests.
- Table-creation receipt status reads are now read-only.
- An
audarray with a non-string entry is now refused as malformed. It used to be ignored. - Hoglite redirects are not followed, and an owner hint must be a DNS label.
- Storage credentials for the server's own jobs (#594, #597, #600):
- New
HOGLAKE_STORAGE_PROVIDER=ambient|static|broker. Unset keeps the old rule:staticwhen bothHOGLAKE_S3_ACCESS_KEYandHOGLAKE_S3_SECRET_KEYare set,ambientotherwise. An inconsistent explicit choice fails boot and names the variable. brokerexchanges client credentials and is configured with:HOGLAKE_STORAGE_BROKER_TOKEN_URL;HOGLAKE_STORAGE_BROKER_CLIENT_IDandHOGLAKE_STORAGE_BROKER_CLIENT_SECRET;HOGLAKE_STORAGE_BROKER_AUDIENCE(defaulthoglake).
- The broker is then called at
HOGLAKE_STORAGE_BROKER_URLwith{"catalog","prefix","access"}and answers with STS-shaped credentials.- One session per (catalog, access), held in memory, single-flight.
- Refreshed at
min(HOGLAKE_STORAGE_BROKER_REFRESH_MARGIN_SECONDS (default 300), lifetime / 2)before expiry. - A held session is kept through broker failures, with a 5 s–60 s backoff.
- The server keeps one S3 client per store and signs each request with the catalog's credentials.
- Access levels are
read<write<delete. The hydrator asks forread, compaction (and its layout probe) forwrite, and only cleanup asks fordelete.writeincludes nos3:DeleteObject(#597). - Broker URLs must be
https, orhttpto loopback only.HOGLAKE_STORAGE_BROKER_ALLOW_HTTP=true(defaultfalse) allowshttpto any host, for an in-cluster broker (#600).
- New
- Reserved namespaces (#573):
- New
HOGLAKE_RESERVED_NAMESPACES, a comma-separated list (default empty). POST …/namespacesrefuses a reserved name, compared ignoring ASCII case, with 422validation. No caller is exempt, and nothing is written.- Each entry must match the identifier pattern, or the server does not start.
- A namespace created before its name was reserved keeps working. Once dropped, it cannot be created again.
docs/auth-tenancy.md§6.2c has the query that finds such namespaces.
- New
- Pinned reads (#572, #590, #605):
- Every read that accepts
snapshot/at_timestampnow resolves the namespace as it was at the pin, on both backends:getTable,listTables,listFiles,partitionValues,fileStats,changes(withto_snapshot) andplanScan. After a drop and recreate they used to return the wrong incarnation, or 404. - A pinned read whose snapshot expires while it reads metadata now answers 410
expired, on PostgreSQL and hoglite (#605). Head reads are unchanged.
- Every read that accepts
- Hoglite head reads (#583): head
getTable/listTablesread the head, the namespace andtable_totalsin one read transaction. This removes the O(files) aggregate fallback a concurrent commit used to trigger.- Head
listTables: 3–4 round trips → 1. - Head
getTable: 7–9 round trips → 5.
- Head
- Hoglite maintenance (#586, #587, #605, #606, #607). All of these are manual, per catalog and routed by the token's placement. Hoglite has no background loop, catalog registry or lease.
- #586 adds a PostgreSQL maintenance seam. It changes no behaviour.
- Catalog options GET/PATCH, and maintenance run recording to the ledger (best effort; a ledger failure never replaces the task's outcome) (#587).
POST …/maintenance/expireadvances the retention floor, purges expired metadata in bounded pages, and queues ended files in the removal ledger (#605).POST …/maintenance/cleanupdrains the bulk and staging removal queues through the server's object store and purges old run records, receipts and drained removals (#606). It now emits the files-removed metric.POST …/maintenance/rehydrate(manual requeue) changes metadata only (#607).- Retirement runs through the backend seam (#607). It has no HTTP trigger.
- Status, run history and other maintenance on hoglite still answer 501
not_supported_on_backend. - New hoglite tenant indexes (#606):
receipts_created_at,removals_staging_queue,removals_bulk_queue,removals_drained_atandmaintenance_runs_started_at. These are first-release DDL with no tenant migration. - The hoglite alter transaction guards the planned sort maximum (#605).
pyhoglake / hedgerow
- New
ops.set_variant_shredding(name, shredding)(#580):- It validates the declaration locally against the server's grammar and copies it into the op.
- Only
Noneclears.{}and{"shredding": None}raiseValidationErrorlocally (#614). - A no-op response re-seeds the handle's cache and DDL pin at the head, so nothing prepared earlier is invalidated.
variant.to_python/verifygiven acolumncheck against the live declaration. To read a file written under an earlier declaration, passshredding=or neither.
- The
authmodule's docs are issuer-neutral (#575). - Variant codec: unchanged; only its CI workflow's action pins changed. The
variant-codecextra still pinspyhoglake-variant-codec0.1.0. - hedgerow: README only.
millrace
- Credentials (#601). millrace now sends a credential to hoglake from
HOGLAKE_AUTH_*. Set exactly one source:- client credentials:
HOGLAKE_AUTH_TOKEN_URL,HOGLAKE_AUTH_CLIENT_IDandHOGLAKE_AUTH_CLIENT_SECRET, plusHOGLAKE_AUTH_AUDIENCE(defaulthoglake). These are minted, cached and refreshed, with one re-mint on a 401; HOGLAKE_AUTH_TOKEN;HOGLAKE_AUTH_TOKEN_FILE, read once at startup.
- client credentials:
- With no source set, millrace sends no header, as before. Two sources, or partial client credentials, exit 2.
- After
set_variant_shredding, the next flush is refusedddl_since_read_snapshot, and millrace rebuilds it on the new declaration (#580).
webui
- Sign-in with a pasted access token (#560):
- The token is held in
sessionStorageonly, and sent on/v1/*and/metrics. With no token, requests are unchanged. - A 401 drops the token and opens the panel, which says whether the token is expired, missing or refused. A token past its
expis dropped client-side. - Operator-only pages (central maintenance, database health) show a "needs an operator token" notice on 401, 403 or a typed 404.
- The token is held in
CI / docs
- CI:
- The legacy gigahog state callbacks are removed from the release workflows. GHCR and ECR publication are unchanged (#585).
just test-hogliteruns the hoglite live tests locally in a Linux container (ci/hoglite-live-local.sh,ci/check-hoglite-live.sh) (#591).- New
signed-commitsPR check, andCONTRIBUTING.mddocuments the commit-signing setup (#603).
- Docs:
- Dependencies: Ktor 3.6.1 (#569), AWS SDK 2.57.10 (#604), webui npm minor/patch group (#568), GitHub Actions minor/patch group (#592).
Operators
- Migrations: none.
- Defaults:
- Every new setting is off or matches 1.4.9:
HOGLAKE_STORAGE_PROVIDERunset keeps the old static-or-ambient rule;HOGLAKE_STORAGE_BROKER_ALLOW_HTTP=false;HOGLAKE_RESERVED_NAMESPACESempty;HOGLAKE_AUTH_CLIENT_CLASSESempty;HOGLAKE_AUTH_SCOPED_MAX_LIFETIME_SECONDS=900, the old fixed cap.
HOGLAKE_AUTH_MODEstill defaults tooff.
- Every new setting is off or matches 1.4.9:
- Metrics label change (#577): Go default-UA requests move from the old issuer label to
client="go". A provisioner that sends its own UA product token is counted asotherunless it is listed inHOGLAKE_AUTH_CLIENT_CLASSES. Update dashboards and alerts. - Token acceptance changes (#576, #577, #589):
- Tokens without
tenare now accepted as tenant tokens. - An
audarray with a non-string entry is now refused. - A JWKS with an RSA key under 2048 bits, or with an
alg/ktymismatch, fails to load.
- Tokens without
- Hoglite with forwarded JWTs (#589):
- The backend must accept the forwarded token, and metadata grants must carry
aud["hoglake","hoglite"](seedocs/auth.md). - Before enabling hoglite enforcement, wait out the 15-minute lifetime of the existing single-audience tokens.
- Deleting a hoglite catalog now needs an operator token.
- The backend must accept the forwarded token, and metadata grants must carry
- Hoglite tenants: the new indexes (#606) have no migration. Drop and recreate existing development tenants to get them.
- VARIANT compaction (
HOGLAKE_COMPACTION_VARIANT=true):- Groups that were refused for mixed layouts now compact. Expect more rewrite work right after the upgrade, and
splitcounts after anyset_variant_shredding. - Retained footers (up to 16 MiB of serialized footer bytes per group; larger once parsed) sit outside
HOGLAKE_COMPACTION_SORTED_HEAP_BYTES. Leave heap headroom for them. unconvertible_schemano longer counts mixed-layout groups.- A steady
layout_probe_onlyrate above what arrivals explain means the layout memory is being lost: restarts, the 250k-entry cap, or shape eviction.
- Groups that were refused for mixed layouts now compact. Expect more rewrite work right after the upgrade, and
- Storage broker (#597): a broker must accept the
deleteaccess level, which cleanup now requests. A broker that grants delete withwritekeeps working, but over-grants compaction. - millrace (#601): a pod that has more than one
HOGLAKE_AUTH_*credential source set exits 2 at startup. A millrace pod writing to awarn,enforceorlocalserver needs a credential withwriteon its destination catalog.