Skip to content

v1.4.8

Choose a tag to compare

@jghoman jghoman released this 06 Nov 01:05
· 139 commits to main since this release
c908c35

Server, pyhoglake and hedgerow release. It adds the object-prefix table layout, per-tenant authorization (off by default), VARIANT writes from pyhoglake with a Rust codec, and commit-lock metrics. Five migrations (V29–V33): two build indexes concurrently on hog_data_file. Auth stays off unless configured, so an existing deployment needs no config change.

Server

  • Object-prefix layout (#480, #481, #483, #491, #496, #479):
    • A table can name an integer field with set_object_prefix_field. Allowed only on an empty table, and it can't be unset.
    • Every data and delete file then lives under …/data/<ns>/<table>/<field>=<value>/, enforced at commit (422 object_prefix_violation).
    • The hydrator checks each file's prefix against its footer and quarantines mismatches (V30, V31).
    • Compaction compacts under each group's prefix.
    • Commits read the newest live prefix column, not its history.
    • Retired partition specs are kept through expiry.
  • Authorization (HOGLAKE_AUTH_MODE, default off) (#460, #475, #526, #538, #539, #540, #542):
    • Per-tenant catalog authorization at the HTTP boundary under warn / enforce.
    • A public API listener (HOGLAKE_PUBLIC_PORT, default off) always enforces and refuses operator tokens.
    • /metrics on an infra listener with no auth (HOGLAKE_METRICS_PORT, default off).
    • ten: scoped tokens, parsed strictly and refused on catalog routes.
    • Namespace containment (V33): a namespace that owns its prefix. Scoped callers read, and write only to, their own contained namespaces.
  • Commit-lock metrics (#441): waiters, holders and hold time per catalog and path.
  • Bounded exact partition inspection (#482, #485). V32 adds the delete-file snapshot lookup index and drops an unused aggregate query.
  • Compaction of VARIANT columns (#466): copies them in their declared layout, behind HOGLAKE_COMPACTION_VARIANT (default off).
  • hoglite catalog adapter (#534): added but not wired; nothing constructs it.
  • Fixes:
    • HOGLAKE_S3_PATH_STYLE is parsed with boolEnv (#532).
    • Unknown ledger task names pass through the runs feeds (#508).
    • PROBE-ALLCAT sweeps its own database (#470).

pyhoglake / hedgerow

  • VARIANT writes:
    • Table.append and Table.prepare_append_tables write top-level variant columns in the layout of each column's type_params.shredding.
    • They take variant_on_invalid= ("raise", the default, or "null", refused for a NOT NULL variant column) and variant_report=.
    • A variant column's values come as pa.json_() text, the null type (all SQL NULL), or storage in its declaration's write form; a plain string is refused.
    • columns_to_arrow_schema and column_to_arrow_field take variant= ("json", "storage" or "read"; the default still refuses), and the "json" form carries variant_field's marker.
    • prepare_append_tables no longer refuses a variant destination, and the _hog* check stops at a variant column's own name.
    • Caveats:
      • Read-back through the Trino connector is not yet verified by a harness.
      • Compaction skips tables with a variant column unless the server sets HOGLAKE_COMPACTION_VARIANT. It then also skips any group holding a file in another layout or written by DuckDB (#70).
      • DuckDB's own Parquet reader folds a Variant null into SQL NULL, and the hoglake DuckDB extension refuses a variant table at bind (#87).
      • The files of a partitioned variant append are all in memory before the first upload.
    • (#453, #464)
  • Public writer core (#465):
    • pyhoglake.write_part(table, columns, *, write_options, ...) writes one partition group as a PreparedPart (body, size, footer_size, metadata).
    • Its registration(uri, columns, *, stats, partition_values=None) returns the FileRegistration dict. registration also takes stats_field_ids= (only those fields' stats).
    • append and prepare_append_tables are built on it, with the same bytes for a table with no variant column.
    • Table.append now checks the footer of every file it writes.
    • timestamp_s below the top level (in a struct, list or map) is accepted by prepare_append_tables and prepare_append_files, which used to refuse it.
  • Object prefix (client side) (#497):
    • TableInfo carries object_prefix_field, and pyhoglake.object_prefix builds and checks an object-prefix table's paths and stats from its TableInfo, as the server does.
    • A commit refused with 422 object_prefix_violation raises ObjectPrefixViolationError (re_prepare=True, a ValidationError) where it used to raise a plain ValidationError.
    • Table.append and prepare_append_* don't place files, so on such a table they are always refused.
  • Other:
    • Prepared appends accept map columns, and the retention read takes a lock (#461).
    • pyhoglake, hedgerow and duckdb-client send bearer tokens (#472).
  • Variant codec: pyhoglake-variant-codec 0.1.0 provides encode, shredding, decode, verify and structure_fault in Rust (#519, #520, #521, #527, #531). The variant-codec extra pins it exactly.

millrace (ships per commit via Kargo, listed for reference)

  • Writes object-prefix tables under each file's team prefix (#513, #528).
  • MILLRACE_STAGE_REPIN_FROM (#514); the flush commits counter is labelled with its destination (#515).
  • MILLRACE_VARIANT_SOURCES (#468).
  • VARIANT codec metrics (#529, #530, #533).
  • LZ4-framed record values are decompressed; a corrupt frame drops as undecodable_lz4, one that decompresses past 32 MiB as oversized_lz4 (#541).
  • Decimals a column can't hold are dropped (#469).

Operators

  • Migrations V29–V33:
    • V29 (hog_table_layout), V30 (a prefix_quarantined column with a constant default) and V33 (namespace containment columns) are small and run in a transaction with a 5 s lock timeout.
    • V31 and V32 build indexes on hog_data_file CONCURRENTLY, outside a transaction. On large catalogs (prod-us gigahog) expect them to take minutes. Promote outside peak compaction.
  • Auth, the public listener and the infra metrics listener are all off unless configured.
  • HOGLAKE_COMPACTION_VARIANT stays off unless set.

Dependencies

  • Dependabot groups for actions, cargo, Python and npm.