Repository navigation
v1.4.11
Server, pyhoglake, millrace and webui release.
- Atomic partition replacement. A new commit route ends whole live data files of a table and appends their replacements in one snapshot. The changefeed records it as
table_replaced. - Auth wave 2. The server now has a session-profile token contract, off by default. Every catalog store a handler gets is checked against the token and bound to it. Route values are read from the path only.
- Remote schemas, Client side. A namespace name can be served read-only from another hoglake deployment, optionally under a local alias.
- Hoglite maintenance. Manual compaction now runs through the executor PostgreSQL uses, and per-catalog maintenance status and run history work on hoglite.
- Migrations: V36 (
V36__replacement_changes.sql). It widens thehog_snapshot_change.kindCHECK and addshog_commit_receipt.ended_files. Details are under Operators. - Upgrading: no config change is needed, and every new setting defaults to off. Before rolling out, check the caveats under Operators:
- V36 holds an ACCESS EXCLUSIVE lock on
hog_snapshot_changewhile it validates; - with the default
HOGLAKE_AUTH_SESSION_PROFILE=off, a token that carries a session-profile claim is now refused; - a handler can no longer reach a catalog or namespace the token does not grant, and under
warna scoped caller is refused for this; - a query parameter named like a route value is no longer read or relayed.
- V36 holds an ACCESS EXCLUSIVE lock on
Server
- Atomic partition replacement (#571, #631):
POST /v1/catalogs/{catalog}/commit/replacements/prepared, advertised as the new capabilityatomic-partition-replacement-v1. A server that does not support it answers 404, so it never ignoresfile_endsand publishes only the appends.- The body is a
CommitRequestplusfile_ends(new schemaTableFileEnds). Each entry givesnamespace,table, a requiredexpected_table_uuid, and exactly one ofpartitions(tuples in thepartition_valuesencoding) orall_files: true.- A
year,month,day,hourorbucketvalue must be a base-10 integer string (20401, not2025-11-10); anything else is a 422. - A tuple that matches no live file ends nothing and is not an error. A table may appear in only one entry.
- A
- Required fields:
idempotency_key,read_snapshot,authorandmessage.deletesorrequire_unchanged_tables: trueis a 400.appendsmay be empty. - Under the commit lock the server checks, in order:
- the table incarnation (409
table_recreated); - the conflict window;
- the partition spec (409
partition_spec_mismatchwhile a live file has another spec;all_filesis exempt).
- the table incarnation (409
- It then ends each matching live file together with its live deletion vector, and applies the appends.
- Conflict window:
all_files: the table must be unchanged sinceread_snapshot.partitions: only the target tuples must be unchanged. Any DDL on the table also conflicts, but appends to other partitions do not.- Compaction never conflicts. A compaction group planned against an ended file skips that file.
- Files appended by the same request are never ended by it. An appended path that the catalog already records, live or ended, is a 422.
- Nothing is deleted at commit. Ended files go through normal retention, expiry and cleanup.
CommitResultandGET /commit/receipts/{operation}gainended_files, which is also returned on replay. It is omitted on other endpoints and on receipts written before V36.- Change kind
table_replaced: recorded besidetable_deleted_fromwhen a replacement ended at least one file of the table.changes()answers 409reconciliation_requiredfor a window that crosses one, as it does for a truncate. The barrier sits on the change row, so it holds at the retention floor as well. - Implemented on PostgreSQL and hoglite. The existing commit routes reject
file_ends. - Containment order fix (#631): on PostgreSQL, the recorded-path check now runs after the namespace containment checks. A path under another contained namespace is refused with
containment_violation, whether or not that path is recorded. Hoglite already checked in this order.
- Session profile (#622):
- The profile's contract is in
docs/auth.md("Session profile with embedded storage credentials"). It is PROPOSED and experimental. - Its claims are
profile,version,purpose,primary_catalog,remote_schemas(read only, at most 16) andaws(an STS-shaped credential, withexp ≤ aws.expires_at).sid,generation,session_deadlineandgrantsare optional. - The server only validates the shape, records
remote_schemasand forwards the bytes. It never uses the credentials. - New
HOGLAKE_AUTH_SESSION_PROFILE=off|on(defaultoff). Any other value fails boot.- With
off, a token that carriesprofile,aws,primary_catalogorremote_schemasis refused with the new reasonprofile_not_enabled. It is no longer read as a plain metadata token. - With
on, the profile is validated, and anoperatortoken may not carry it.
- With
- New metric
hoglake_auth_session_profile_total{outcome="accepted"|"refused_disabled"|"refused_invalid"}. - Contract vectors:
contract-vectors.jsongainstenant_session_profile_disabled. The new filesession-profile-vectors.jsonholds the profile's vectors; all aremutationvectors until an issuer mints the profile.
- The profile's contract is in
- Store entitlement (#627, #629):
CatalogStoreSelectorapplies the auth plugin's catalog and scope check to whatever catalog name the handler passes it. Refusals:- 404 worded as a missing catalog;
- 403 for a missing scope;
- 401 with no caller.
- Modes follow the plugin:
offchecks nothing;warncounts, audits and lets the request through, except for a scoped caller, which is refused as underenforce.
- Each request adds at most one refusal to
hoglake_auth_requests_total. The audit line carriesat=store. There is no new label. - The handler now gets a per-request view of the catalog store and of each sub-backend, bound to the token (#629):
- every caller: any catalog other than the resolved one is refused;
- scoped callers: any namespace the token does not allow is refused, whether it comes from the path, the body or an id (table creations, file ids, lookup cursors);
- scoped callers: operations that name no namespace are refused, except renewing and abandoning the caller's own upload claims.
- A disallowed namespace answers the 404 of a missing namespace. An id that belongs to one answers the 404 of a missing id. A scoped table-creation status read in a disallowed namespace now answers 404 for the operation.
- The namespace gate, the scoped-write checks and the listing filter are unchanged and still decide first. A consistent request costs no extra lookup.
- Not covered:
/v1/maintenance/status,/v1/maintenance/runs,/v1/database/healthandGET /v1/mounts. The route table refuses scoped callers on these.docs/auth-tenancy.mdlists them.
- Path-only route values (#625):
- Handlers read
{catalog},{namespace},{table},{operation},{upload}and the other route values from the matched path only, as the route table and gates do. Before this, they read them from merged parameters that included the query string. - The mount relay (
MountHostClient) no longer forwards a query parameter namedcatalog,namespaceortable, in any letter case. - Documented query parameters are unchanged.
- Handlers read
- Remote schemas (#628, #630):
- A
HOGLAKE_MOUNT_HOSTS_FILEentry with"match": {"type": "namespace", "name": NAME}serves the namespaceNAMEof every catalog on this server read-only, relayed to another hoglake (the Host).kindmust behoglakeandauthmust beforward. - Access:
- Served only to a scoped caller whose token grants read on the catalog and whose
remote_schemasclaim allows the schema. The catalog must exist locally. - Anyone else gets the 404 of a missing namespace, and nothing is sent to the Host.
- Served only to a scoped caller whose token grants read on the catalog and whose
- Relayed routes: get namespace, list tables, get table and scan, with the caller's
Authorizationheader. Every other route on the schema answers 501mount_operation_unavailablefor a read and 403read_only_catalogfor a write. GET …/namespacesadds{"name", "remote": true}for each schema the token allows, without calling the Host. On the wire,Namespace.namespace_idis now optional: it is absent exactly whenremoteis true. A local entry is unchanged.NAMEis reserved (it is added to the reserved namespaces). A local namespace with that name, or a case variant of it, is hidden from every path, body, id, query parameter and upload prefix, but not removed.- Boot refuses a namespace entry in these cases:
HOGLAKE_AUTH_SESSION_PROFILEis noton;- its URL is not
httpsand the entry does not set"allow_insecure_http": true. An entry that opts in is logged.
- Alias (#630): an entry-level
"remote_name"sets the schema's name on the Host (defaultNAME).- The
remote_schemasclaim and the relayed path useremote_name. - The answers'
nameand the table'snamespaceare rewritten back toNAMEwithinmax_response_bytes. - Two namespace entries with the same Host name are refused at boot.
- An aliased answer refused after its first bytes are sent is cut mid-transfer.
- The
allow_insecure_httpandremote_nameare refused oneventsandcatalogentries. A server with no namespace entry behaves as before.- The Host side is not built.
- A
- Hoglite maintenance (#623, #624, #626):
- #623 extracts
CompactionExecutorand aCompactionStorageseam fromCompactionService. PostgreSQL behaviour is unchanged. POST …/maintenance/compactnow works on hoglite through the same executor (#624):- the executor owns VARIANT layout handling, budgets and accounting;
- the hoglite adapter reserves claims per input, reads at most
candidateBudgetcandidates per table, and publishes behind guards. - It stays manual; there is no loop, registry or lease.
GET …/maintenance/statusand the per-catalog run history now work on hoglite, from one read-only snapshot, paged by an indexed cursor of at most 500 rows (#626). Fleet status, fleet runs and database health remain PostgreSQL-only, and answer 501not_supported_on_backendwhen no PostgreSQL backend is configured.- New hoglite tenant DDL, created at tenant bootstrap:
files_compaction_bucket,files_live_stats,files_live_size,removals_queued_atandmaintenance_runs_loop;- the
receipt_endedtable, which a replacement creates if it is missing.
- #623 extracts
- OpenAPI: the version is
1.4.11. Additions:commitPreparedReplacementandTableFileEnds;ended_filesonCommitResultand on the receipt;table_replacedin the change kinds;Namespace.remote, withnamespace_idnow optional.
pyhoglake / hedgerow
- The
variant-codecextra now pinspyhoglake-variant-codec==0.1.1(#638). - Variant codec 0.1.1 (#632): pyo3-arrow 0.21 on arrow 60.1 (was arrow 59.3), with no source changes. Encoded VARIANT bytes are unchanged, and PROTOCOL stays 3.
- The
pyarrowfloor is now>=26.0.1(#570). - The write golden test ignores only the parquet footer's
created_bystamp (#633). - hedgerow: the COPY test fixtures bind parameters by name, so they pass on duckdb 1.5.6 and 2.0.0 (#639). Production code is unchanged.
millrace
slatedb==0.18.*(was 0.17) (#636), andpyarrow>=26.0.1(#570).- mutmut 3.8.1, for pytest 9.2 (#633). The mutation ledger records 286 mutants, 268 killed and 18 survived.
webui
CI / docs
- Tests:
- Docs:
docs/auth-roadmap.mdPhase 3 is reconciled with the hogtower architecture specs, andAGENT.mdgains a cross-repo specs section (#621).docs/auth-tenancy.mdcovers the store check and remote schemas (#627–#630).docs/operational-notes.mdgains a "Maintenance scheduling" section (#624).- Dev versions were restored after 1.4.10 (#616).
- Dependencies:
Operators
- Migration V36 (PostgreSQL, #571):
- It runs in one transaction with
SET LOCAL lock_timeout = '5s', which bounds the wait for each lock. On timeout the whole file rolls back and Flyway fails; retry it when traffic is quieter. - Steps:
DROP CONSTRAINT hog_snapshot_change_kind_checktakes ACCESS EXCLUSIVE onhog_snapshot_change.ADD … NOT VALIDwithtable_replacedadded to the kinds.VALIDATE CONSTRAINT.
- The VALIDATE runs under the DROP's ACCESS EXCLUSIVE lock, which is held until commit. The usual NOT VALID/VALIDATE split does not avoid blocking here, so commits and reads of
hog_snapshot_changewait for the full scan. - Expiry keeps
hog_snapshot_changebounded to the retention window, so on a catalog with normal retention the scan is short. Catalogs whose expiry has fallen behind will hold the lock for longer. ALTER TABLE hog_commit_receipt ADD COLUMN ended_files bigintis metadata-only (NULL default, no rewrite), but also takes ACCESS EXCLUSIVE.- Hoglite tenants need no migration.
- It runs in one transaction with
- Defaults:
- Token acceptance change (#622): with the default
off, a token that carriesprofile,aws,primary_catalogorremote_schemasis now refused (profile_not_enabled). These claims used to be ignored. Check that no issuer adds them before you upgrade, or setHOGLAKE_AUTH_SESSION_PROFILE=on. - Store entitlement (#627, #629):
- Under
enforceorlocal, a handler that reached a catalog the token does not name, or (for scoped callers) a namespace the token does not allow, is now refused with 404/403. - Under
warn, these refusals are counted and audited withat=store, and only scoped callers are refused. - Watch
hoglake_auth_requests_totaland the audit log forat=storeafter the upgrade.
- Under
- Path-only route values (#625): a client that put
catalog,namespaceortablein the query string and relied on it overriding the path now gets the path's value. The mount relay drops such parameters. - Remote schemas (#628, #630):
- Configuring one needs
HOGLAKE_AUTH_SESSION_PROFILE=onand anhttpsURL, unless the entry setsallow_insecure_http. - A local namespace with the schema's local name becomes invisible to clients. It is not removed, and catalog-wide storage usage and maintenance still include it.
- One concurrency limit per Host is shared by all catalogs.
- Configuring one needs
- Hoglite tenants (#624, #626): the new indexes are created at tenant bootstrap. On older tenants:
- status reports unknown backlog counts, while ledger reads still work;
- a compaction plan uses one capped fallback read, which can scan and sort the live candidates.
- A GET never upgrades a tenant schema. Recreate development tenants to get the indexes.