Title: fix: Use LONGBLOB for SQL registry proto columns on MySQL by nikolauspschuetz · Pull Request #6566 · feast-dev/feast · GitHub
Open Graph Title: fix: Use LONGBLOB for SQL registry proto columns on MySQL by nikolauspschuetz · Pull Request #6566 · feast-dev/feast
X Title: fix: Use LONGBLOB for SQL registry proto columns on MySQL by nikolauspschuetz · Pull Request #6566 · feast-dev/feast
Description: What The SQL registry stores each Feast object as a serialized protobuf in a binary column. On MySQL/MariaDB, SQLAlchemy's LargeBinary maps to BLOB, which caps at 64 KB. A single FeatureView proto routinely exceeds that, so MySQL silently truncates the write and the registry later fails to load with a protobuf DecodeError (e.g. feast serve failing to start). PostgreSQL and SQLite were never affected. Fixes #5800. How Introduce a dialect-aware ProtoBytes type that emits LONGBLOB on MySQL and MariaDB while keeping LargeBinary's default mapping on every other dialect (BLOB on SQLite, BYTEA on PostgreSQL), and apply it to all binary proto/metadata columns. MariaDB is registered separately because SQLAlchemy 2.x reports dialect.name == "mariadb". The variants are chained (not variadic) so the expression also works on SQLAlchemy 1.4.x, which Feast still supports (SQLAlchemy>=1.4.19). metadata.create_all only creates missing tables, so existing MySQL registries are not migrated automatically. Added a best-effort startup check (_warn_if_narrow_blob_columns) that, on MySQL/MariaDB, logs an error naming any columns still typed BLOB and points at the documented migration. It is logged at ERROR (so monitoring pipelines that filter below ERROR still catch it) but deliberately does not refuse to start — a registry whose protos all fit in 64 KB is unaffected and a routine upgrade should not break it. (Happy to switch to fail-fast-with-escape-hatch if maintainers prefer.) Documented the migration in the SQL registry reference, including the metadata-lock risk, a mandatory "stop writers first" checklist, and online-schema-change guidance (pt-online-schema-change / gh-ost). Note: BLOB→LONGBLOB is a column type change, which InnoDB performs with ALGORITHM=COPY (rebuild) — INPLACE is not supported. Tests Unit (tests/unit/infra/registry/test_sql_registry.py): assert the compiled DDL emits LONGBLOB on MySQL/MariaDB, BLOB on SQLite, BYTEA on PostgreSQL; cover the startup-check paths (errors on stale, silent when migrated, skips non-MySQL, never raises on query failure, runs on both read+write engines). Integration (tests/integration/registration/test_universal_registry.py): test_apply_feature_view_large_proto_roundtrip_mysql applies a FeatureView with a >64 KB proto on the live mysql_registry / mysql_registry_async fixtures and reads it back from the DB (allow_cache=False), asserting byte-identity — the regression guard for the truncation bug. Docs / agent guidance docs/reference/registries/sql.md — new "serialized-proto columns use LONGBLOB" section + migration runbook. Updated the in-repo agent rules/skills (feast-components rule pair, feast-architecture and feast-testing SKILLs) so the ProtoBytes convention and test patterns are discoverable.
Open Graph Description: What The SQL registry stores each Feast object as a serialized protobuf in a binary column. On MySQL/MariaDB, SQLAlchemy's LargeBinary maps to BLOB, which caps at 64 KB. A single FeatureView pr...
X Description: What The SQL registry stores each Feast object as a serialized protobuf in a binary column. On MySQL/MariaDB, SQLAlchemy's LargeBinary maps to BLOB, which caps at 64 KB. A single FeatureVie...
Opengraph URL: https://github.com/feast-dev/feast/pull/6566
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f0420bf9-d658-2c38-5113-e67702d703ef |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EB88:F32D9:394359E:51889F1:6A569B19 |
| html-safe-nonce | 34cb4eeaebc7c2f7955ee48e8dde7991a21a6d363b5d3985523135ea1cd0606f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjg4OkYzMkQ5OjM5NDM1OUU6NTE4ODlGMTo2QTU2OUIxOSIsInZpc2l0b3JfaWQiOiI0ODA3Njg5NzAwMzI3NzI1ODQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 98156e826b84f70cd8d96d6553a84b9eca2f10343df3b07ff44ded78cbd230ce |
| hovercard-subject-tag | pull_request:3952615523 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6566/files |
| twitter:image | https://avatars.githubusercontent.com/u/8151217?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8151217?s=400&v=4 |
| og:image:alt | What The SQL registry stores each Feast object as a serialized protobuf in a binary column. On MySQL/MariaDB, SQLAlchemy's LargeBinary maps to BLOB, which caps at 64 KB. A single FeatureView pr... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 647a25f437e2f54eccdd162bd007c8ae70f4235c4125dba0f4518747cc8b9615 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05adb86a60ce3d701e556eded3ab26300ec6bcc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width