forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embeddings: fix unmarshaling old version of index (sourcegraph#51070)
Unmarshalling indexes 2 versions back would fail because the struct we were unmarshalling into changed shape. This was not caught by tests because the struct that we were using to generate the encodings was the same as the struct we were using to unmarshal (this is the kind of thing Protobuf's back/forward compability guarantees were intended to solve). This PR fixes the issue by reconstructing the previous shape of the struct and providing a conversion method to the new version. This is a band-aid fix, and we _really_ need to solve migrations for embeddings indexes in the near term.
- Loading branch information
1 parent
ebeeb11
commit 1d2a227
Showing
3 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters