-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi Feast maintainers! I have observed what i consider a bug, or at least something to be improved, i also shared this in the slack community channel.
I think this is related with issue #3703
Here you have the details.
Expected Behavior
Feast should be able to run long-lived, periodically materialized FeatureViews using the MySQL registry without the registry growing unbounded or becoming unreadable. The registry should not reach a state where feast serve or any CLI command fails due to accumulated internal state.
Current Behavior
Feast records every materialization interval for a FeatureView in the registry. When using the MySQL registry, each materialize / materialize-incremental run appends a new interval record for each feature view feature_view_proto column , causing the serialized FeatureView registry protobuf to grow monotonically (~30 bytes per materialization in our tests).
With enough materializations, the serialized proto exceeds the MySQL BLOB column size limit (65,535 bytes). When this happens MySQL silently truncates the blob, after which Feast fails to start with:
google.protobuf.message.DecodeError:
Error parsing message with type 'feast.core.FeatureView'At this point:
- feast
servefails. - any Feast CLI command that loads the registry fails.
- recovery requires manual MySQL registry intervention: Which is deleting the featureview row in the
feature_viewstable. - No matter the FeatureView definition itself is small; growth comes from accumulated materialization interval history.
Steps to reproduce
- Configure Feast with a SQL registry backed by
MySQL. It uses theBLOBMySQL type for thefeature_view_protocolumn in thefeature_viewstable. - Define a FeatureView and run
feast apply. - Run
materialize-incrementalrepeatedly over time (e.g. via a cron job). - Observe that the registry entry for the FeatureView grows on each run (~30 bytes). For that you can use the following query:
SELECT
feature_view_name,
project_id,
OCTET_LENGTH(feature_view_proto) AS proto_bytes
FROM feature_views;To get an output like:
| feature_view_name | project_id | proto_bytes |
|---|---|---|
| my_test_fv | my_test_project | 65535 |
- Once the stored proto reaches 65,535 bytes (like in the example), MySQL truncates it.
- Run
feast serve, it will fail to load with protobufDecodeError.
Specifications
- Version:
v0.58.0 - Platform: docker.
- Subsystem: both arm and amd images.
Possible Solution
Clarify and/or improve SQL registry behavior for long-running deployments, for example by:
- SQL registry
BLOLBcolumns must be unbounded (MEDIUMBLOB/LONGBLOB), but this is just a temporal solution. - Introducing pruning of materialization interval history.
Please tell me if you need more information. Thanks in advance!