fix: Use CopyFrom() instead of __deepycopy__() for creating a copy of protobuf object. by shuchu · Pull Request #3999 · feast-dev/feast
What this PR does / why we need it:
This PR fix the segmentation fault error while upgrading the "protobuf" version to above 4.24.0.
Based on my debug, the root cause is this line of code under the "plan()" function of "FeatureStore" class. (around line 748 of https://github.com/feast-dev/feast/blob/master/sdk/python/feast/feature_store.py )
current_infra_proto = self._registry.proto().infra.__deepcopy__()
The above "self._registry.proto().infra" could return an Empty object and will create a segmentation fault.
My current solution is to create an empty object first and use the "CopyFrom()" method from protobuf.
My test env:
python 3.8
protobuf 4.25.3
Which issue(s) this PR fixes:
Fixes #3921